Pan-tilt angle calculation method and device, electronic device and storage medium

By obtaining initial data and using Kalman filtering and Rodriguez rotation formula, the gravitational acceleration of the drone gimbal is reconstructed and calibrated, which solves the noise interference problem in the gimbal attitude angle solution and achieves higher attitude solution accuracy and gimbal stability.

CN120596769AActive Publication Date: 2025-09-05ZHEJIANG HUAFEI INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202511094633.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-09-05
Estimated Expiration
2045-08-06

AI Technical Summary

Technical Problem

In the existing technology, the attitude angle calculation of the drone gimbal is interfered by sensor noise, resulting in unstable attitude calculation results and reduced gimbal stability. In particular, it is difficult to accurately calculate the true gravity acceleration under large-scale maneuvering conditions.

Method used

By obtaining the initial gravitational acceleration and angular velocity data, the Kalman filter and Rodriguez rotation formula are used to reconstruct the gravitational acceleration data. Combined with the observation model and the carrier coordinate system, the true gravitational acceleration and gimbal attitude angle are determined to reduce noise interference.

Benefits of technology

The accuracy of gimbal attitude angle calculation is improved, the gimbal's stabilization control capability is enhanced, noise interference is reduced, and the gimbal's stability and image stability are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120596769A_ABST
    Figure CN120596769A_ABST
Patent Text Reader

Abstract

The invention relates to a pan-tilt angle calculation method and device, an electronic device and a storage medium, and the method comprises the steps: obtaining initial gravitational acceleration data and initial angular velocity data, determining reconstructed gravitational acceleration data according to the initial gravitational acceleration data and the initial angular velocity data, and calculating the angle of a pan-tilt according to the reconstructed gravitational acceleration data; and determining an observation model according to the initial gravitational acceleration data, determining real gravitational acceleration data according to the reconstructed gravitational acceleration data and the observation model, obtaining a carrier coordinate gravitational acceleration, and determining a cradle head attitude angle according to the carrier coordinate gravitational acceleration and the real gravitational acceleration data. According to the method and the device, the problem of how to accurately calculate the attitude angle of the unmanned aerial vehicle holder is solved, noise interference is reduced, the real gravitational acceleration is restored, and the stability augmentation control capability of the holder is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of drone control, and in particular to a gimbal angle calculation method, device, electronic device, and storage medium. Background Art

[0002] With technological advancements, the drone industry is booming, and gimbal applications are becoming increasingly common. Since drone flight inevitably involves significant noise, the gimbal's built-in sensors also generate noisy data. This noise can interfere with the gimbal's angle calculations. For example, when using an accelerometer mounted on a drone gimbal to calibrate the gyroscope's angular velocity error, the accelerometer can be affected by noise from other directions, leading to unstable attitude calculations and reduced gimbal stability. Therefore, during extended maneuvers, noise reduction is crucial to restore the true gravity acceleration and effectively enhance the gimbal's stabilization and control capabilities.

[0003] Currently, there is no effective solution to the problem of how to accurately calculate the attitude angle of the drone gimbal in related technologies. Summary of the Invention

[0004] The embodiments of the present application provide a gimbal angle calculation method, device, electronic device and storage medium to at least solve the problem of how to accurately calculate the gimbal attitude angle of a drone in the related art.

[0005] In a first aspect, an embodiment of the present application provides a method for calculating a gimbal angle.

[0006] In some embodiments, the pan / tilt angle calculation method includes:

[0007] Obtain initial gravitational acceleration data and initial angular velocity data;

[0008] Determining reconstructed gravitational acceleration data according to the initial gravitational acceleration data and the initial angular velocity data;

[0009] determining an observation model according to the initial gravity acceleration data, and determining true gravity acceleration data according to the reconstructed gravity acceleration data and the observation model;

[0010] The carrier coordinate gravity acceleration is obtained, and the gimbal attitude angle is determined according to the carrier coordinate gravity acceleration and the real gravity acceleration data.

[0011] In some embodiments, determining an observation model based on the initial gravity acceleration data, and determining true gravity acceleration data based on the reconstructed gravity acceleration data and the observation model includes:

[0012] Determining the initial gravity acceleration data as measurement data of a Kalman filter to determine an observation model;

[0013] Kalman filtering is performed on the reconstructed gravity acceleration data and the observation model to determine true gravity acceleration data.

[0014] In some embodiments, determining the initial gravity acceleration data as measurement data for Kalman filtering to determine the observation model includes:

[0015] The initial gravity acceleration data is determined as measurement data of Kalman filtering, and an observation model is determined according to the measurement data, observation noise and observation matrix.

[0016] In some embodiments, determining the reconstructed gravity acceleration data based on the initial gravity acceleration data and the initial angular velocity data includes:

[0017] Determining theoretical gravitational acceleration data according to the initial gravitational acceleration data and the initial angular velocity data;

[0018] Reconstructed gravitational acceleration data is determined according to the theoretical gravitational acceleration data and the initial angular velocity data.

[0019] In some embodiments, determining theoretical gravitational acceleration data based on the initial gravitational acceleration data and the initial angular velocity data includes:

[0020] Determining an angular velocity antisymmetric matrix according to the initial angular velocity data, and determining a state transfer formula according to the initial gravitational acceleration data and the angular velocity antisymmetric matrix;

[0021] The theoretical gravitational acceleration data is determined according to the state transfer formula and the initial value of gravitational acceleration.

[0022] In some embodiments, determining the reconstructed gravity acceleration data based on the theoretical gravity acceleration data and the initial angular velocity data includes:

[0023] determining a transfer noise covariance matrix based on the initial angular velocity data;

[0024] Reconstructed gravity acceleration data is determined according to the transfer noise covariance matrix and the theoretical gravity acceleration data.

[0025] In some embodiments, obtaining the carrier coordinate gravity acceleration and determining the gimbal attitude angle according to the carrier coordinate gravity acceleration and the real gravity acceleration data includes:

[0026] Obtaining carrier coordinate gravity acceleration, and determining an angle error based on the carrier coordinate gravity acceleration and the true gravity acceleration data;

[0027] The gimbal attitude angle is determined based on the angle error and the fourth-order Runge-Kutta method.

[0028] In a second aspect, an embodiment of the present application provides a gimbal angle calculation device.

[0029] In some embodiments, the gimbal angle calculation device includes an initial data acquisition module, a reconstructed acceleration determination module, a real acceleration determination module, and a gimbal attitude angle determination module:

[0030] The initial data acquisition module is used to acquire initial gravitational acceleration data and initial angular velocity data;

[0031] The reconstructed acceleration determination module is configured to determine reconstructed gravity acceleration data based on the initial gravity acceleration data and the initial angular velocity data;

[0032] The real acceleration determination module is configured to determine an observation model based on the initial gravity acceleration data, and to determine real gravity acceleration data based on the reconstructed gravity acceleration data and the observation model;

[0033] The gimbal attitude angle determination module is used to obtain the carrier coordinate gravity acceleration and determine the gimbal attitude angle according to the carrier coordinate gravity acceleration and the real gravity acceleration data.

[0034] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the gimbal angle calculation method as described in the first aspect above is implemented.

[0035] In a fourth aspect, an embodiment of the present application provides a storage medium on which a computer program is stored. When the program is executed by a processor, the gimbal angle calculation method described in the first aspect above is implemented.

[0036] Compared with the related art, the gimbal angle calculation method, device, electronic device and storage medium provided in the embodiments of the present application obtain initial gravity acceleration data and initial angular velocity data, determine the reconstructed gravity acceleration data based on the initial gravity acceleration data and initial angular velocity data, and determine the observation model based on the initial gravity acceleration data, further determine the real gravity acceleration data based on the reconstructed gravity acceleration data and the observation model, obtain the carrier coordinate gravity acceleration, and determine the gimbal attitude angle based on the carrier coordinate gravity acceleration and the real gravity acceleration data, thereby solving the problem of how to accurately calculate the gimbal attitude angle of the drone, reduce noise interference, restore the real gravity acceleration, and effectively improve the gimbal stabilization control capability.

[0037] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0039] Figure 1 1 is a hardware structure block diagram of a terminal according to a pan / tilt angle calculation method according to an embodiment of the present application;

[0040] Figure 2 is a flow chart of a method for calculating a pan / tilt angle according to an embodiment of the present application;

[0041] Figure 3 is a flow chart of a method for calculating a pan / tilt angle according to a preferred embodiment of the present application;

[0042] Figure 4 It is a structural block diagram of a gimbal angle calculation device according to an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means and should not be understood as the contents disclosed in the present application being insufficient.

[0044] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments unless there is a conflict.

[0045] Unless otherwise defined, technical or scientific terms used herein shall have the ordinary meaning as understood by persons of ordinary skill in the art to which this application belongs. The terms "a," "an," "an," "the," and similar expressions used herein do not denote limitations on quantity and may refer to either the singular or the plural. The terms "comprise," "include," "have," and any variations thereof, used herein, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising 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 the process, method, product, or apparatus. The terms "connected," "connected," "coupled," and similar expressions used herein are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. As used herein, "plurality" means greater than or equal to two. "And / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" may mean: A exists alone; A and B exist simultaneously; or B exists alone. The terms "first", "second", "third" and the like involved in this application are merely used to distinguish similar objects and do not represent a specific ordering of the objects.

[0046] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. Taking running on a terminal as an example, Figure 1 FIG is a block diagram of the hardware structure of the terminal of the pan-tilt angle calculation method according to an embodiment of the present invention. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0047] Memory 104 can be used to store computer programs, such as software programs and modules for application software, such as the computer program corresponding to the gimbal angle calculation method in the embodiments of the present invention. Processor 102 executes the computer programs stored in memory 104 to execute various functional applications and data processing, thereby implementing the aforementioned method. Memory 104 may include high-speed random access memory (RAM) 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 embodiments, memory 104 may further include memory remotely located relative to processor 102, and such remote memory may 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.

[0048] Transmission device 106 is used to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the terminal's communications provider. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0049] This embodiment provides a method for calculating the pan / tilt angle. Figure 2 is a flow chart of a method for calculating the pan / tilt angle according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0050] Step S201: Acquire initial gravitational acceleration data and initial angular velocity data.

[0051] In an embodiment of the present application, raw data from an acceleration inertial measurement unit is collected, and a low-pass filter is used to filter out high-frequency noise from the raw data. The acceleration inertial measurement unit is generally divided into an accelerometer and a gyroscope. The accelerometer is used to measure acceleration and is only affected by gravity acceleration when stationary, while the gyroscope measures the angular velocity of rotation. The accelerometer can calculate the tilt angle by performing an inverse tangent on the three-axis acceleration data, but it is easily affected by motion interference. The gyroscope can obtain the tilt angle by integrating the angular velocity meter, but this will produce accumulated errors. Therefore, the attitude solution is calculated by combining the accelerometer and gyroscope data. The accelerometer collects acceleration and the gyroscope collects angular velocity, and the two velocities are filtered using a low-pass filter to determine the filtered initial gravity acceleration data, which can be represented by α, and the filtered initial angular velocity data, which can be represented by ω.

[0052] Step S202 : Determine reconstructed gravity acceleration data according to the initial gravity acceleration data and the initial angular velocity data.

[0053] In the embodiment of the present application, the exponential form of the Rodriguez rotation formula is used to describe the relationship between gravitational acceleration and rotation angle. Specifically, if any vector p in space rotates around the unit rotation axis at unit angular velocity ω for time t Taking the derivative of this vector, we know , initial conditions , then integrating the above formula, we can get: , which is the exponential form of the Rodriguez rotation formula. In the embodiment of the present application, the gravitational acceleration data is substituted into p in the formula, and the angular velocity data is substituted into ω in the formula. Then, the reconstructed gravitational acceleration data can be determined based on the initial gravitational acceleration data, the initial angular velocity data, and the exponential form of the Rodriguez rotation formula.

[0054] Step S203: determining an observation model based on the initial gravity acceleration data, and determining real gravity acceleration data based on the reconstructed gravity acceleration data and the observation model.

[0055] Kalman filtering is a method of using calculated data and measured data to jointly estimate real data. In an embodiment of the present application, the calculated data can be the reconstructed gravity acceleration calculated using the Rodriguez rotation formula, the initial gravity acceleration and the angular velocity, while the measured data is the data measured by the accelerometer. The calculated data is calibrated using the measured data, and the Kalman gain is calculated to determine the gain of the calculated data and the measured data, and then the corrected data used is determined. The initial gravity acceleration data α after accelerometer filtering can be used as the measurement data of the Kalman filter to determine the observation model, and the corrected real gravity acceleration data is determined based on the reconstructed gravity acceleration data and the observation model.

[0056] The true gravity acceleration data can be estimated by adjusting the values ​​of the gyroscope transfer noise covariance matrix Q and the accelerometer observation noise covariance matrix R. The gravity acceleration is updated in real time using the following formula:

[0057]

[0058]

[0059]

[0060]

[0061] The optimal estimated state refers to the process of extracting the true state of the system from noisy observation data through mathematical methods. Its core goal is to minimize the statistical characteristics of the estimation error (such as mean square error) under given conditions. In the above formula, k is the Kalman filter gain, is the system state at time k estimated using the optimal estimated state at time k-1. In the embodiment of the present application, the system state is the real gravity acceleration, that is, the gravity acceleration at time k is estimated using the gravity acceleration at time k-1 based on Kalman filtering. In the formula, the initial gravity acceleration is set to , P k for The covariance matrix of , R is the observation noise covariance matrix, H is the observation matrix, F is the state transfer matrix, and Q is the transfer noise covariance matrix.

[0062] Step S204 , obtaining the carrier coordinate gravity acceleration, and determining the gimbal attitude angle according to the carrier coordinate gravity acceleration and the real gravity acceleration data.

[0063] When the gimbal is centered, the ideal three-axis gravity acceleration data of the drone is: , where g n is the gravitational acceleration in the earth coordinate system, and the calculation formula for the carrier coordinate gravitational acceleration in the carrier coordinate system is as follows: , where V b is the carrier coordinate gravity acceleration in the carrier coordinate system, is the direction cosine matrix. It is expressed as follows using quaternion:

[0064]

[0065] Furthermore, the carrier coordinate gravity acceleration is obtained, and the gimbal attitude angle is determined based on the carrier coordinate gravity acceleration and the real gravity acceleration data.

[0066] Through the above steps, the embodiment of the present application obtains initial gravity acceleration data and initial angular velocity data, determines reconstructed gravity acceleration data based on the initial gravity acceleration data and the initial angular velocity data, and determines the observation model based on the initial gravity acceleration data, so as to determine the real gravity acceleration data based on the observation model and the reconstructed gravity acceleration data obtained by updating and fusing the accelerometer observation data, thereby achieving the purpose of using the gyroscope angular velocity data to fuse the accelerometer data to obtain the real gravity acceleration. Furthermore, the carrier coordinate gravity acceleration is obtained, and based on the carrier coordinate gravity acceleration and the real gravity acceleration data, the real gravity acceleration data is used to calibrate the gyroscope error, perform attitude solution, and determine the gimbal attitude angle.

[0067] In drone applications, the gimbal needs to be mounted on the drone and keep it pointing forward horizontally. This requires real-time calculation of the gimbal's tilt angles in three directions and driving the gimbal motor to rotate in time to offset the tilt angle. However, traditional methods ignore the fact that the accelerometer is susceptible to external interference from the propeller / motion acceleration, resulting in the vector after the three-axis acceleration data is synthesized being not equal to the actual gravitational acceleration. As a result, the calibrated gyroscope data also has deviations, and the gimbal's attitude angle has abnormal fluctuations. The embodiment of the present application separates the gravitational acceleration from the accelerometer data, uses the gravitational acceleration to calibrate the gyroscope error, and finally obtains the true angle of the gimbal. Based on the Kalman filter and the Rodriguez rotation formula, the true gravitational acceleration data is obtained, thereby improving the reliability of the algorithm, making the gimbal's tilt angle calculation more accurate, and the image stability higher. This solves the problem of how to accurately calculate the attitude angle of the drone gimbal, reduces noise interference, restores the true gravitational acceleration, and effectively improves the gimbal's stabilization control capability.

[0068] In some embodiments, step S203 includes:

[0069] Step S2031: Determine the initial gravity acceleration data as the measurement data of the Kalman filter to determine the observation model.

[0070] In the embodiment of the present application, the initial gravity acceleration data α after accelerometer filtering is used as the measurement data of the Kalman filter to determine the observation model, and the corrected real gravity acceleration data is determined based on the reconstructed gravity acceleration data and the observation model.

[0071] Step S2032: Perform Kalman filtering on the reconstructed gravity acceleration data and the observation model to determine the true gravity acceleration data.

[0072] In an embodiment of the present application, the reconstructed gravity acceleration data includes the transfer noise covariance matrix of the gyroscope, and the observation model includes the observation noise covariance matrix of the accelerometer. Therefore, by performing Kalman filtering on the reconstructed gravity acceleration data and the observation model, the transfer noise covariance matrix and the observation noise covariance matrix are adjusted to determine the true gravity acceleration data.

[0073] Through the above steps, the initial gravity acceleration data is determined as the measurement data of the Kalman filter to determine the observation model, and the reconstructed gravity acceleration data and the observation model are Kalman filtered to determine the true gravity acceleration data, thereby improving the accuracy of the gravity acceleration data and further improving the accuracy of the gimbal angle solution.

[0074] In some embodiments, step S2031 includes:

[0075] In step S2131, the initial gravity acceleration data is determined as the measurement data of the Kalman filter, and the observation model is determined according to the measurement data, observation noise and observation matrix.

[0076] Specifically, in the embodiment of the present application, the initial gravity acceleration data α after accelerometer filtering is used as the measurement data Z of the Kalman filter, and the obtained , where the subscripts x, y, and z represent the three-axis projection data of the accelerometer, then the observation model is: Z k =H k ×α k +V k , , where V k is the observation noise, Indicates V k It obeys a Gaussian distribution with a mean of 0 and a variance of R. m represents the matrix dimension, indicating that it is an m×1 zero vector matrix. Preferably, m is 3, and R is usually an m×m matrix. Thus, V k That is an m-dimensional multivariate Gaussian distribution, H k is the observation matrix:

[0077]

[0078] Through the above steps, the embodiment of the present application determines the initial gravity acceleration data as the measurement data of the Kalman filter, determines the observation model based on the measurement data, observation noise and observation matrix, and provides a specific observation model determination method to improve the model reliability and high feasibility.

[0079] In some embodiments, step S202 includes:

[0080] Step S2021: Determine theoretical gravitational acceleration data based on the initial gravitational acceleration data and the initial angular velocity data.

[0081] In the embodiment of the present application, the exponential form of the nonlinear Rodriguez rotation formula is linearized, and based on the linearized Rodriguez rotation formula, the theoretical gravitational acceleration data is determined according to the initial gravitational acceleration data and the initial angular velocity data.

[0082] Step S2022: Determine the reconstructed gravity acceleration data according to the theoretical gravity acceleration data and the initial angular velocity data.

[0083] The transfer noise covariance matrix is ​​determined according to the initial angular velocity data, and the reconstructed gravity acceleration data is determined according to the theoretical gravity acceleration data and the transfer noise covariance matrix.

[0084] Through the above steps, before determining the reconstructed gravity acceleration data, the embodiment of the present application first determines the theoretical gravity acceleration data based on the initial gravity acceleration data and the initial angular velocity data, thereby modularizing the data calculation, facilitating debugging, and improving feasibility and accuracy.

[0085] In some embodiments, step S2021 includes:

[0086] Step S2121: determine an angular velocity antisymmetric matrix based on the initial angular velocity data, and determine a state transfer formula based on the initial gravitational acceleration data and the angular velocity antisymmetric matrix.

[0087] In the embodiment of the present application, the exponential form of the nonlinear Rodriguez rotation formula is linearized, and Taylor expansion is used and higher-order data of three times or more are discarded to obtain the formula: ,in, is the unit matrix, θ is the angle between the space vector and the coordinate system. In the embodiment of the present application, the initial gravity acceleration data is brought into the space vector, then is the angle between the gravitational acceleration and the earth coordinate system, is the antisymmetric matrix of angular velocity Assuming that in the initial state, the acceleration data measured by the accelerometer is the starting value of gravity acceleration g0, and its specific value is a standard g value, that is, the gimbal remains stationary when powered on, and the angles of the two frames before and after the drone are extremely small, according to the small angle approximation principle, the time t taken to rotate the angle θ can be used to replace the angle θ, thereby obtaining the state transition formula .

[0088] Step S2221: Determine theoretical gravity acceleration data according to the state transfer formula and the initial value of gravity acceleration.

[0089] Following the above, according to the Rodriguez rotation formula and the state transfer formula, the following formula can be used to determine the theoretical gravitational acceleration data: , where g k is the theoretical gravitational acceleration at time k, the initial value of gravitational acceleration g0 is a standard g value, and the time interval between time k and time k+1 is t.

[0090] Through the above steps, the embodiment of the present application determines the state transfer formula based on the antisymmetric matrix of angular velocity, and determines the theoretical gravity acceleration data based on the state transfer formula and the starting value of gravity acceleration, thereby providing a feasible method for determining theoretical gravity acceleration data, and converting the nonlinear Rodriguez rotation formula function into a linear function, and Kalman filtering can be directly used to improve computational efficiency and save resources.

[0091] In some embodiments, step S2022 includes:

[0092] Step S2122: Determine the transfer noise covariance matrix according to the initial angular velocity data.

[0093] In the embodiment of the present application, the Kalman filter state vector is assumed to be the three-axis component of gravity acceleration, that is, , then the state transfer equation is , , where W k is the transfer noise covariance matrix, which is used to describe the error of angular velocity in theoretical calculation. Indicates that the transfer noise has a mean of 0 and a variance of Q k Gaussian distribution, n represents the matrix dimension, indicating that it is an n×1 zero vector matrix. Preferably, n can be 3, F k is the state transfer matrix: .

[0094] Step S2222: Determine the reconstructed gravity acceleration data according to the transfer noise covariance matrix and the theoretical gravity acceleration data.

[0095] The state transfer equation is determined based on the transfer noise covariance matrix and the theoretical gravity acceleration data. The state transfer equation can be considered a recursive formula, using the system variable data at the previous moment to obtain the system variable data at the next moment. In the embodiment of the present application, the system variable data here can be the three-axis components of gravity acceleration. In addition, at the initial moment, the drone is stationary on the ground, so the three-axis components of gravity acceleration at the initial moment can be set to [0, 0, -9.81]. Furthermore, based on the state transfer equation, the reconstructed gravity acceleration data including the angular velocity error is determined.

[0096] Through the above steps, the embodiment of the present application determines the transfer noise covariance matrix based on the initial angular velocity data. The transfer noise covariance matrix is ​​used to describe the error of angular velocity during theoretical calculation, that is, noise interference, and determines the reconstructed gravity acceleration data based on the transfer noise covariance matrix and the theoretical gravity acceleration data to further eliminate noise interference and improve the accuracy of attitude solution.

[0097] In some embodiments, step S204 includes:

[0098] Step S2041 , obtaining the carrier coordinate gravity acceleration, and determining the angle error according to the carrier coordinate gravity acceleration and the real gravity acceleration data.

[0099] In the embodiment of the present application, the calculation formula of the gravity acceleration in the carrier coordinate system is as follows: , is the gravity acceleration of the carrier coordinate, The gravitational acceleration in the geodetic coordinate system, the ideal gravitational acceleration data of the three axes when the gimbal is centered , is the direction cosine matrix, which is represented by quaternion as follows:

[0100]

[0101] Cross-product the carrier coordinate gravity acceleration and the real gravity acceleration data, normalize g and V, and At small angles, it is approximately θ, and the angle error can be obtained , used to calibrate gyroscope errors.

[0102] Step S2042: Determine the gimbal attitude angle based on the angle error and the fourth-order Runge-Kutta method.

[0103] In the embodiment of the present application, the true angular velocity data can be obtained by performing pi compensation on the angle θ, and the quaternion is updated using the fourth-order Runge-Kutta method, specifically: ,in,

[0104] , , ,

[0105] Based on the real-time updated quaternion, the gimbal attitude angle can be determined as follows:

[0106] Pitch angle

[0107] Roll angle

[0108] Through the above steps, the embodiment of the present application obtains the carrier coordinate gravity acceleration, determines the angle error based on the carrier coordinate gravity acceleration and the actual gravity acceleration data, and uses the fourth-order Runge-Kutta method to determine the gimbal attitude angle. Compared with the commonly used first-order Runge-Kutta method, the calculation accuracy is higher and more accurate.

[0109] The embodiments of the present application are described and illustrated below through preferred embodiments.

[0110] Figure 3 This is a preferred flow chart of the pan / tilt angle calculation method according to an embodiment of the present application, such as Figure 3 As shown, the pan / tilt angle calculation method includes the following steps:

[0111] Step S301, obtaining initial gravitational acceleration data and initial angular velocity data, and determining theoretical gravitational acceleration data based on the initial gravitational acceleration data and initial angular velocity data;

[0112] Step S302, determining reconstructed gravity acceleration data based on theoretical gravity acceleration data and initial angular velocity data;

[0113] Step S303: determining the initial gravity acceleration data as the measurement data of the Kalman filter, and determining the observation model according to the measurement data, observation noise and observation matrix;

[0114] Step S304: performing Kalman filtering on the reconstructed gravity acceleration data and the observation model to determine the true gravity acceleration data;

[0115] Step S305 , obtaining the carrier coordinate gravity acceleration, and determining the gimbal attitude angle according to the carrier coordinate gravity acceleration and the real gravity acceleration data.

[0116] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings 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 can be executed in an order different from that shown here.

[0117] This embodiment also provides a pan / tilt angle calculation device, which is used to implement the above-mentioned embodiments and preferred embodiments. Details that have already been described will not be repeated. As used below, the terms "module," "unit," "subunit," etc. may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0118] Figure 4 is a structural block diagram of a pan / tilt angle calculation device according to an embodiment of the present application. Figure 4 As shown, the device includes an initial data acquisition module 10, a reconstructed acceleration determination module 20, a real acceleration determination module 30 and a gimbal attitude angle determination module 40:

[0119] An initial data acquisition module 10 is used to acquire initial gravitational acceleration data and initial angular velocity data;

[0120] The reconstructed acceleration determination module 20 is used to determine the reconstructed gravity acceleration data according to the initial gravity acceleration data and the initial angular velocity data;

[0121] A true acceleration determination module 30 is configured to determine an observation model based on the initial gravity acceleration data, and to determine true gravity acceleration data based on the reconstructed gravity acceleration data and the observation model;

[0122] The gimbal attitude angle determination module 40 is used to obtain the carrier coordinate gravity acceleration and determine the gimbal attitude angle according to the carrier coordinate gravity acceleration and the real gravity acceleration data.

[0123] 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 be located in the same processor; or the above modules can be located in different processors in any combination.

[0124] This embodiment further 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 execute the steps in any one of the above method embodiments.

[0125] 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.

[0126] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0127] Obtain initial gravitational acceleration data and initial angular velocity data;

[0128] Determining reconstructed gravity acceleration data according to the initial gravity acceleration data and the initial angular velocity data;

[0129] Determine an observation model based on the initial gravity acceleration data, and determine true gravity acceleration data based on the reconstructed gravity acceleration data and the observation model;

[0130] Obtain the carrier coordinate gravity acceleration, and determine the gimbal attitude angle based on the carrier coordinate gravity acceleration and the real gravity acceleration data.

[0131] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be repeated here.

[0132] In addition, in conjunction with the pan-tilt angle calculation method in the above embodiments, the present application can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, it implements any of the pan-tilt angle calculation methods in the above embodiments.

[0133] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are 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.

[0134] 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, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0135] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A method for calculating a pan / tilt angle, characterized in that: The following steps are involved: Obtain initial gravitational acceleration data and initial angular velocity data; Determining reconstructed gravitational acceleration data according to the initial gravitational acceleration data and the initial angular velocity data; determining an observation model according to the initial gravity acceleration data, and determining true gravity acceleration data according to the reconstructed gravity acceleration data and the observation model; The carrier coordinate gravity acceleration is obtained, and the gimbal attitude angle is determined according to the carrier coordinate gravity acceleration and the real gravity acceleration data.

2. The method for calculating the pan / tilt angle according to claim 1, wherein: Determining an observation model based on the initial gravity acceleration data, and determining true gravity acceleration data based on the reconstructed gravity acceleration data and the observation model includes: Determining the initial gravity acceleration data as measurement data of a Kalman filter to determine an observation model; Kalman filtering is performed on the reconstructed gravity acceleration data and the observation model to determine true gravity acceleration data.

3. The method for calculating the pan / tilt angle according to claim 2, wherein: Determining the initial gravity acceleration data as measurement data of a Kalman filter to determine an observation model includes: The initial gravity acceleration data is determined as measurement data of Kalman filtering, and an observation model is determined according to the measurement data, observation noise and observation matrix.

4. The method for calculating the pan / tilt angle according to any one of claims 1 to 3, wherein: The determining, based on the initial gravitational acceleration data and the initial angular velocity data, to reconstruct gravitational acceleration data comprises: Determining theoretical gravitational acceleration data according to the initial gravitational acceleration data and the initial angular velocity data; Reconstructed gravitational acceleration data is determined according to the theoretical gravitational acceleration data and the initial angular velocity data.

5. The method for calculating the pan / tilt angle according to claim 4, wherein: Determining theoretical gravitational acceleration data according to the initial gravitational acceleration data and the initial angular velocity data includes: Determining an angular velocity antisymmetric matrix according to the initial angular velocity data, and determining a state transfer formula according to the initial gravitational acceleration data and the angular velocity antisymmetric matrix; The theoretical gravitational acceleration data is determined according to the state transfer formula and the initial value of gravitational acceleration.

6. The method for calculating the pan / tilt angle according to claim 5, wherein: Determining the reconstructed gravity acceleration data according to the theoretical gravity acceleration data and the initial angular velocity data includes: determining a transfer noise covariance matrix based on the initial angular velocity data; Reconstructed gravity acceleration data is determined according to the transfer noise covariance matrix and the theoretical gravity acceleration data.

7. The method for calculating the pan / tilt angle according to claim 6, wherein: The acquiring of the carrier coordinate gravity acceleration and determining the gimbal attitude angle according to the carrier coordinate gravity acceleration and the real gravity acceleration data includes: Obtaining carrier coordinate gravity acceleration, and determining an angle error based on the carrier coordinate gravity acceleration and the true gravity acceleration data; The gimbal attitude angle is determined based on the angle error and the fourth-order Runge-Kutta method.

8. A pan / tilt angle calculation device, characterized in that: It includes the initial data acquisition module, the reconstructed acceleration determination module, the real acceleration determination module and the gimbal attitude angle determination module: The initial data acquisition module is used to acquire initial gravitational acceleration data and initial angular velocity data; The reconstructed acceleration determination module is configured to determine reconstructed gravity acceleration data based on the initial gravity acceleration data and the initial angular velocity data; The real acceleration determination module is configured to determine an observation model based on the initial gravity acceleration data, and to determine real gravity acceleration data based on the reconstructed gravity acceleration data and the observation model; The gimbal attitude angle determination module is used to obtain the carrier coordinate gravity acceleration and determine the gimbal attitude angle according to the carrier coordinate gravity acceleration and the real gravity acceleration data.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the pan-tilt angle calculation method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the pan-tilt angle calculation method according to any one of claims 1 to 7 when running.

Citation Information

Patent Citations

  • Handheld pan-tilt attitude estimation method based on extended Kalman filtering

    CN111625768A

  • ADS-B data filtering method and device, computer device and storage medium

    CN113257044A

  • Method and device for measuring attitude of moving carrier in real time

    CN114234970A

  • Attitude resolving method, device and system, engineering machinery and storage medium

    CN115855043A

  • Motion state monitoring method and device, computer equipment and storage medium

    CN118816936A

Cited By

  • Airborne pan-tilt attitude resolving method, device and equipment

    CN121742510A

  • Airborne gimbal attitude solving method, device and equipment

    CN121742510B