PTZ dynamic calibration method, device and equipment
By regularly acquiring gimbal IMU data and performing automatic calibration when stationary, it solves the problem of complex gimbal calibration methods and inability to recalibrate the existing gimbal, and improves the accuracy and stability of gimbal attitude estimation.
Patent Information
- Application Number
- CN202111551733.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-12-17
AI Technical Summary
The existing gimbal calibration method is complex and requires manual participation. It cannot perform secondary calibration during the gimbal operation process, and is greatly affected by environmental errors, resulting in inaccurate attitude estimation.
By regularly acquiring the IMU data of the gimbal, it determines whether it is in a stationary state, and performs automatic calibration of the accelerometer and gyroscope when stationary to achieve dynamic calibration of the gimbal and improve calibration efficiency and accuracy.
It realizes automatic calibration of the gimbal, reduces manual participation, improves calibration efficiency and accuracy, can adapt to environmental changes during the working process of the gimbal, and enhances the posture stability of the gimbal.
Smart Images

Figure CN114295147B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of gimbal anti-shake, and in particular to a gimbal dynamic calibration method, device and equipment. Background Art
[0002] In order for the gimbal to maintain a stable posture, it is necessary to obtain acceleration data and angular velocity data through the IMU (inertial measurement unit) chip installed on the gimbal to estimate its own posture.
[0003] At present, low-cost IMU chips are MEMS (Micro Electro Mechanical System) sensors. This type of sensor has a fixed error due to the influence of its own materials, processes, circuits, etc., and also has a random error due to the influence of the environment (such as temperature). These two errors have a serious impact on the gimbal's estimation of its own posture, so the gimbal must be calibrated when working.
[0004] Practice has shown that traditional gimbal calibration solutions all require manual calibration before the gimbal works. The operation is complicated and requires the use of external equipment with high requirements (such as a horizontal surface) for calibration. In addition, the gimbal cannot be calibrated again when it is working after calibration. If secondary calibration is required, the gimbal needs to be disassembled. Summary of the invention
[0005] In view of this, the present application provides a gimbal dynamic calibration method, device and equipment.
[0006] Specifically, the present application is implemented through the following technical solutions:
[0007] According to a first aspect of an embodiment of the present application, a gimbal dynamic calibration method is provided, comprising:
[0008] Regularly obtain the IMU data of the gimbal to be calibrated within the set time;
[0009] Determining whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data;
[0010] When it is determined that the gimbal to be calibrated is in a stationary state, the accelerometer and gyroscope of the gimbal to be calibrated are calibrated according to the acquired IMU data.
[0011] According to a second aspect of an embodiment of the present application, a gimbal dynamic calibration device is provided, comprising:
[0012] An acquisition unit is used to periodically acquire the IMU data of the gimbal to be calibrated within a set time;
[0013] A determination unit, configured to determine whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data;
[0014] A calibration unit is used to perform accelerometer calibration and gyroscope calibration on the gimbal to be calibrated according to the acquired IMU data when the determination unit determines that the gimbal to be calibrated is in a stationary state.
[0015] According to a third aspect of an embodiment of the present application, an electronic device is provided, the electronic device comprising:
[0016] A processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the above method.
[0017] The gimbal dynamic calibration method of the embodiment of the present application obtains the IMU data of the gimbal to be calibrated within a set time at regular intervals, and determines whether the gimbal to be calibrated is in a stationary state based on the obtained IMU data. Furthermore, when it is determined that the gimbal to be calibrated is in a stationary state, the accelerometer and gyroscope of the gimbal to be calibrated are calibrated based on the obtained IMU data, thereby realizing automatic calibration of the gimbal without manual intervention, thereby improving the efficiency of calibration. In addition, the gimbal calibration is no longer limited to a one-time calibration before the gimbal works, but IMU data can be obtained at regular intervals during the gimbal working process, and when it is determined that the gimbal to be calibrated is in a stationary state, the gimbal to be calibrated is calibrated, thereby improving the adaptability of the gimbal calibration to the environment, thereby improving the accuracy of the gimbal calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of a flow chart of a pan / tilt dynamic calibration method shown in an exemplary embodiment of the present application;
[0019] Figure 2 A schematic diagram of the basic hardware structure of an anti-shake gimbal is shown as an exemplary embodiment of the present application;
[0020] Figure 3 This is a schematic diagram of an algorithm flow of automatic gimbal calibration according to an exemplary embodiment of the present application;
[0021] Figure 4 This is a schematic structural diagram of a pan / tilt dynamic calibration device shown as an exemplary embodiment of the present application;
[0022] Figure 5 This is a schematic structural diagram of another pan / tilt dynamic calibration device according to an exemplary embodiment of the present application;
[0023] Figure 6The figure is a schematic diagram of the hardware structure of an electronic device shown as an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0024] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0025] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0026] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0027] See also Figure 1 , is a flow chart of a pan / tilt dynamic calibration method provided in an embodiment of the present application, such as Figure 1 As shown, the gimbal dynamic calibration method may include the following steps:
[0028] Step S100: regularly obtain the IMU data of the gimbal to be calibrated within a set time.
[0029] In the embodiment of the present application, considering that the random errors vary greatly when the gimbal works in different environments, especially the influence of temperature (referred to as temperature drift), the impact on the IMU chip is very large, and only one calibration cannot adapt to the influence of environmental factors such as temperature drift. Therefore, in order to improve the accuracy of the gimbal calibration, the gimbal needs to be calibrated multiple times during the operation of the gimbal.
[0030] Accordingly, in an embodiment of the present application, IMU data of the gimbal to be calibrated within a set time (which can be set according to actual needs, such as 2 seconds) can be obtained periodically, and the gimbal to be calibrated can be calibrated based on the acquired IMU data.
[0031] For example, the IMU data of the gimbal to be calibrated within a set time can be obtained periodically (the period can be set according to actual needs, such as 2 seconds, 5 seconds, etc.).
[0032] Exemplarily, IMU data may include, but is not limited to, acceleration data and angular velocity data.
[0033] Step S110: Determine whether the gimbal to be calibrated is in a stationary state based on the acquired IMU data.
[0034] In the embodiment of the present application, in order to improve the accuracy of the gimbal calibration, it is usually necessary to calibrate the gimbal based on the data obtained when the gimbal is in a stationary state.
[0035] Correspondingly, for the IMU data acquired in step S100, it can be determined whether the gimbal to be calibrated is in a stationary state based on the acquired IMU data.
[0036] When it is determined that the gimbal to be calibrated is in a stationary state, step S120 can be performed; when it is determined that the gimbal to be calibrated is not in a stationary state, the process can go to step S100 to continue acquiring the IMU data of the gimbal to be calibrated and perform subsequent processing.
[0037] Step S120: When it is determined that the gimbal to be calibrated is in a stationary state, the accelerometer and gyroscope of the gimbal to be calibrated are calibrated according to the acquired IMU data.
[0038] In the embodiment of the present application, when it is determined that the gimbal to be calibrated is in a stationary state, the gimbal to be calibrated can be calibrated according to the acquired IMU data.
[0039] Exemplarily, calibrating the gimbal to be calibrated may include but is not limited to calibrating an accelerometer and a gyroscope of the gimbal to be calibrated.
[0040] For example, the accelerometer of the gimbal to be calibrated may be calibrated according to the acceleration data in the acquired IMU data, and the gyroscope of the gimbal to be calibrated may be calibrated according to the angular velocity data in the acquired IMU data.
[0041] It should be noted that, in the embodiment of the present application, considering that when the gimbal to be calibrated is calibrated for the first time, it is usually not necessary to calibrate the acceleration. Therefore, when it is determined that the gimbal to be calibrated is in a stationary state, it can be determined first whether this is the first time that the gimbal to be calibrated is calibrated. If so, the gyroscope of the gimbal to be calibrated can be calibrated based on the acquired IMU data, and there is no need to calibrate the accelerometer; otherwise, that is, this is not the first time that the gimbal to be calibrated is calibrated, the accelerometer and gyroscope of the gimbal to be calibrated can be calibrated based on the acquired IMU data.
[0042] Exemplarily, when the gimbal to be calibrated has been calibrated once, a flag may be set for the gimbal to be calibrated, and the flag is used to indicate that the gimbal to be calibrated has been calibrated.
[0043] Accordingly, before calibrating the gimbal to be calibrated, it can be determined whether the mark exists. If the mark exists, it indicates that this is not the first time to calibrate the gimbal to be calibrated; if the mark does not exist, it indicates that this is the first time to calibrate the gimbal to be calibrated.
[0044] It can be seen that in Figure 1 In the method flow shown, the IMU data of the gimbal to be calibrated within a set time is obtained at regular intervals, and whether the gimbal to be calibrated is in a stationary state is determined based on the obtained IMU data. Then, when it is determined that the gimbal to be calibrated is in a stationary state, the accelerometer and gyroscope of the gimbal to be calibrated are calibrated based on the obtained IMU data, thereby realizing automatic calibration of the gimbal without manual intervention, thereby improving the efficiency of calibration. In addition, the gimbal calibration is no longer limited to a one-time calibration before the gimbal works, but IMU data can be obtained at regular intervals during the gimbal working process, and when it is determined that the gimbal to be calibrated is in a stationary state, the gimbal to be calibrated is calibrated, thereby improving the adaptability of the gimbal calibration to the environment, thereby improving the accuracy of the gimbal calibration.
[0045] In some embodiments, in step S110, before determining whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data, the following may also be included:
[0046] Filtering the acquired IMU data to remove abnormal data in the acquired IMU data to obtain filtered IMU data;
[0047] In step S110, determining whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data may include:
[0048] Determine whether the gimbal to be calibrated is in a stationary state based on the filtered IMU data;
[0049] In step S120, calibrating the accelerometer and the gyroscope of the gimbal to be calibrated according to the acquired IMU data may include:
[0050] The accelerometer and gyroscope of the gimbal to be calibrated are calibrated based on the filtered IMU data.
[0051] For example, considering that some wild values may appear in the IMU data of the gimbal, these values will reduce the accuracy of the gimbal calibration based on the acquired IMU data.
[0052] Accordingly, in order to improve the accuracy of gimbal calibration, the acquired IMU data may be filtered to filter out abnormal data (i.e., the above-mentioned wild values) in the acquired IMU data to obtain filtered IMU data.
[0053] For example, the acquired IMU data can be clustered according to statistical rules and classified according to the degree of data clustering. The degree of clustering of abnormal data and other data is generally low, so the abnormal data can be screened out and eliminated to obtain relatively pure data.
[0054] Exemplarily, when data filtering is performed in the above manner to obtain filtered IMU data, it can be determined whether the gimbal to be calibrated is in a stationary state based on the filtered IMU data, and when it is determined whether the gimbal to be calibrated is in a stationary state, the accelerometer and gyroscope of the gimbal to be calibrated are calibrated based on the filtered IMU data.
[0055] In some embodiments, in step S110, determining whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data may include:
[0056] According to the acquired IMU data, the mean value of the acceleration modulus and the mean value of the angular velocity modulus are determined respectively;
[0057] When the acceleration modulus mean is less than the first threshold value, and the angular velocity modulus mean is less than the second threshold value, it is determined that the gimbal to be calibrated is in a stationary state.
[0058] Exemplarily, considering that the states of the gimbal mainly include being in a stationary state or a rotating state, and when the gimbal is in a rotating state, there is usually a more obvious acceleration and / or angular velocity, therefore, it is possible to determine whether the gimbal is in a stationary state by the angular velocity and acceleration.
[0059] Accordingly, the mean acceleration modulus and the mean angular velocity modulus can be determined respectively based on the acquired IMU data, and the mean acceleration modulus can be compared with a preset threshold (referred to as the first threshold in this article), and the mean angular velocity modulus can be compared with a preset threshold (referred to as the second threshold in this article).
[0060] For example, the acceleration modulus can characterize the intensity of the object's motion, and the angular velocity modulus can characterize the intensity of the object's rotation.
[0061] Exemplarily, when the mean value of the acceleration modulus is less than the first threshold value, and the mean value of the angular velocity modulus is less than the second threshold value, it can be determined that the gimbal to be calibrated is in a stationary state.
[0062] In some embodiments, when it is determined that the gimbal to be calibrated is in a stationary state, before the accelerometer calibration of the gimbal to be calibrated based on the acquired IMU data, the following may also be included:
[0063] Save the acceleration data in the acquired IMU data, and add 1 to the number of times the gimbal to be calibrated is in a stationary state;
[0064] Determine whether the recorded number of times the PTZ to be calibrated is in a stationary state reaches a third threshold; wherein the third threshold is greater than or equal to 6;
[0065] When the recorded number of times the gimbal to be calibrated is in a stationary state reaches a third threshold, it is determined to execute the above-mentioned operation of accelerometer calibration of the gimbal to be calibrated according to the acquired IMU data, and the recorded number of times the gimbal to be calibrated is in a stationary state is reset.
[0066] For example, considering that the accelerometer mainly has installation angle error, digital-to-analog conversion factor error (also called scale factor), zero deviation and random error (including environmental influences such as temperature and electromagnetic interference), the first three are affected by the chip's own process and materials and are generally fixed values. The last one is mainly affected by the environment and changes all the time. The sum of their values can be combined with the zero deviation (the combined error can be called dynamic error).
[0067] In addition, since at least 6 sets of IMU data are required to obtain the IMU data to determine the above-mentioned error, when calibrating the accelerometer of the gimbal to be calibrated, the number of times the gimbal to be calibrated is in a stationary state can be recorded.
[0068] Exemplarily, each time it is determined that the gimbal to be calibrated is in a stationary state in the manner recorded in steps S100 to S110, the acceleration data in the acquired IMU data can be saved, and the recorded number of times the gimbal to be calibrated is in a stationary state is increased by 1, until the recorded number of times the gimbal to be calibrated is in a stationary state reaches a preset threshold (which can be called a third threshold, and the third threshold is greater than or equal to 6), the accelerometer of the gimbal to be calibrated is calibrated according to the recorded acceleration data, and the recorded number of times the gimbal to be calibrated is in a stationary state is reset.
[0069] In one example, in step S120, calibrating the accelerometer of the gimbal to be calibrated according to the acquired IMU data may include:
[0070] According to the stored acceleration data, the installation angle error, the digital-to-analog conversion factor error and the dynamic error of the accelerometer are determined respectively; wherein the dynamic error includes zero deviation and random error, and the dynamic error changes with the difference of random error;
[0071] The accelerometer of the gimbal to be calibrated is calibrated according to the installation angle error, digital-to-analog conversion factor error and dynamic error of the accelerometer.
[0072] Exemplarily, when it is determined that the recorded number of times the gimbal to be calibrated is in a stationary state reaches a third threshold, the installation angle error, digital-to-analog conversion factor error and dynamic error of the accelerometer can be determined respectively based on the saved acceleration data. The specific implementation can be explained in conjunction with specific examples below.
[0073] When the installation angle error, digital-to-analog conversion factor error and dynamic error of the accelerometer are determined, the accelerometer calibration parameters can be determined based on the installation angle error, digital-to-analog conversion factor error and dynamic error of the accelerometer, and the accelerometer of the gimbal to be calibrated can be calibrated based on the determined accelerometer calibration parameters.
[0074] In some embodiments, in step S120, calibrating the gyroscope of the gimbal to be calibrated according to the acquired IMU data may include:
[0075] The mean value of the angular velocity data in the acquired IMU data is determined as the current gyroscope zero bias;
[0076] Verify the current gyroscope zero bias;
[0077] When the verification passes, the current gyroscope zero bias is used as the latest gyroscope zero bias, and the gyroscope of the gimbal to be calibrated is calibrated according to the latest gyroscope zero bias.
[0078] For example, considering that the gyroscope is usually used to integrate and solve the attitude angle, the gyroscope calibration mainly considers its zero bias. If there is a large zero bias, long-term integration will produce a large cumulative error, which will seriously affect the accuracy of the attitude angle.
[0079] In addition, the zero bias of the gyroscope has the following characteristics: first, the system zero deviation generated by the production of the device itself is generally a fixed value; second, the uncertain zero deviation caused by environmental interference. Environmental interference includes electromagnetic, temperature, humidity, motion state, etc. These interferences are unmeasurable and unpredictable, and are random interferences.
[0080] Therefore, in order to improve the accuracy of gyroscope calibration, the motion state of the gimbal to be calibrated can be detected cyclically. When it is determined that the gimbal to be calibrated is in a stationary state, the gyroscope data at this time is recorded, and then the average is calculated as the current gyroscope zero bias. The zero bias is brought into the gyroscope data for self-detection. After success, it is written into the memory (such as flash) as the latest gyroscope zero bias data, and the gyroscope of the gimbal to be calibrated is calibrated based on the latest gyroscope zero bias.
[0081] It should be noted that in the embodiments of the present application, in order to improve the reliability of the gimbal calibration, the calibration parameters (including accelerometer calibration parameters and / or gyroscope bias) determined in the manner described in the above embodiments can be verified before being used to calibrate the gimbal, and if the verification passes, the determined calibration parameters can be used to calibrate the gimbal.
[0082] Exemplarily, for the acceleration calibration parameters, the acceleration data of each axis of the three axes of the gimbal in a stationary state (which can be called stationary acceleration data) can be obtained, and the stationary acceleration data of each axis can be subtracted from the acceleration calibration value of the corresponding axis, and then the difference between the module length and the gravitational acceleration (such as 9.8) can be determined, and the absolute values of the differences corresponding to each axis can be averaged; if the average value is less than a preset threshold (which can be called the fourth threshold), it is determined that the verification has passed; otherwise, it is determined that the verification has failed.
[0083] Exemplarily, for the gyroscope bias, the angular velocity data of each axis of the three axes of the gimbal in a stationary state (which may be referred to as stationary angular velocity data) may be obtained, and the stationary angular velocity data of each axis may be subtracted from the gyroscope bias of the corresponding axis, and the absolute value of the difference corresponding to each axis may be averaged; if the average value is less than a preset threshold value (which may be referred to as the fifth threshold value), it is determined that the verification has passed; otherwise, it is determined that the verification has failed.
[0084] In order to enable those skilled in the art to better understand the technical solutions provided in the embodiments of the present application, the technical solutions provided in the embodiments of the present application are described below with reference to specific examples.
[0085] like Figure 2 As shown in FIG. 1 , a basic hardware structure diagram of an anti-shake gimbal provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the anti-shake gimbal may include a processor (such as a gimbal microcontroller), an IMU chip (which may be called a gimbal IMU chip), a motor assembly (which may include a Hall sensor or encoder inside the motor, taking the gimbal motor Hall chip as an example) and a mechanical component (not shown in the figure).
[0086] It should be noted that the gimbal is generally not a separate device, but a module of a device, which is connected and communicated with the main processor of the device. For example, when used for video shooting, a camera device (such as a camera) is placed on the gimbal.
[0087] like Figure 2 As shown, when the gimbal is working, the MCU can read the gimbal IMU chip in real time, perform attitude estimation based on the read three-axis acceleration (i.e. the above-mentioned acceleration data) and three-axis angular velocity (i.e. the above-mentioned angular velocity data), and then drive the motor to perform angle compensation according to the motor electrical angle to keep the gimbal attitude stable. At the same time, the gimbal MCU will send some key control data to the host computer for record keeping.
[0088] See also Figure 3 The algorithm flow chart of the automatic calibration of the pan / tilt platform provided in the embodiment of the present application can be as follows: Figure 3 As shown, it may include the following process:
[0089] When the gimbal is powered on, the calibration algorithm starts to work in a loop and reads the IMU data within the set time.
[0090] For example, assuming that the setting time is 2 seconds and the frequency of the IMU chip is 500 Hz, about 1000 sampling data (ie, the above-mentioned IMU data) can be read.
[0091] For example, considering that there may be some wild values in the read IMU data (this is related to the device itself, and low-cost devices generally appear randomly), if these wild values are not filtered out, it will affect the gimbal stillness judgment and calibration, reducing accuracy.
[0092] Therefore, the read IMU data can be filtered to filter out abnormal data and obtain filtered IMU data (which can be called pure data), and the static state is determined based on the filtered IMU data. When the gimbal is in a static state, the accelerometer calibration parameters and gyroscope calibration parameters (i.e., gyroscope bias) are calculated based on the filtered IMU data, and the calculated parameters are updated to the flash to enter the next cycle.
[0093] It should be noted that in the embodiment of the present application, an initial automatic calibration can be performed before the gimbal works for the first time. The gimbal is placed on any surface (such as a desktop, etc.) and left to stand for a period of time (such as 30 seconds), and the gimbal automatically completes the initial calibration.
[0094] Some of the details are described in detail below.
[0095] 1. IMU data filtering algorithm:
[0096] The IMU data of the gimbal in a stationary state approximately follows a normal distribution. The density of abnormal points is small (or not concentrated), so the abnormal points will fall into the 50% area on both sides of the normal distribution density function, and the normal values will fall into the middle 50% area.
[0097] Based on this, the data points are divided by the absolute median difference, the mean is replaced by the median value, and the outlier judgment criteria can be as follows:
[0098]
[0099] Among them, x is the data value output by the IMU, median(x) is the median value of the batch of data, MAD is the absolute median difference of the batch of data, and thresh is the judgment threshold. For example, the value of thresh can be 3.
[0100] 2. Stillness judgment algorithm
[0101] Record the IMU data within 1 second (assuming the frequency is 500 Hz, about 500 data), filter it to obtain pure data (less than or equal to 500), calculate the mean value of the acceleration modulus and the mean value of the angular velocity modulus of these data, if the mean value of the acceleration modulus is less than the preset threshold (that is, the above-mentioned first threshold), and the mean value of the angular velocity modulus is also less than the preset threshold (that is, the above-mentioned second threshold), it is determined that the gimbal is in a stationary state.
[0102] 3. Accelerometer calibration model
[0103] The main errors of accelerometers include installation angle error, digital-to-analog conversion factor error (also called scale factor), zero deviation and random error (including environmental influences such as temperature and electromagnetic interference). The first three are affected by the chip's own process and materials and are generally fixed values. The last one is mainly affected by the environment and changes all the time. Its value and value can be combined with the zero deviation (the combined error can be called dynamic error).
[0104] Assume T a is the installation angle error, K a is the scale factor, b a is the zero deviation (i.e. the dynamic error including the zero deviation and random error mentioned above), and its form is as follows:
[0105]
[0106]
[0107]
[0108] Among them, φ a ,θ a , a are the installation angle errors of the three axes, s x 、s y ,s z are the digital-to-analog conversion factor errors of the three axes, b x , b y , b z are the random errors of the three axes respectively.
[0109] Since the norm of the accelerometer's output value should be equal to the gravitational acceleration regardless of how it is placed, the optimization equation is constructed as follows:
[0110] f(v)=min∑(norm(h(v))-g)^2
[0111] Among them, norm() is used to calculate the modulus, v is the measured value of the parameter, and h(v) is the ideal value of the parameter.
[0112] In order to ensure that the positive and negative axes of the three axes have data distribution, at least 6 sets of data are required to participate in the calculation.
[0113] However, it should be noted that in actual use, the more data involved in the calculation (the appropriate data group can be screened according to the algorithm), the closer the fitted nonlinear function is to the truth, which facilitates the iterative search for the minimum error and the approximation of the optimal parameters. However, too much data will also lead to an increase in the amount of calculation. Therefore, generally 20 to 30 groups of data can be selected for calculation.
[0114] Exemplarily, the above nine parameters can be obtained by using the data recorded six times in a static state and filtering the data, and using the least squares algorithm. The parameters are saved in the flash as the current accelerometer calibration parameters until the next parameter update.
[0115] It should be noted that during the cyclic calibration process, when it is determined that the gimbal is in a stationary state, the IMU data read at this time (IMU data after filtering out abnormal data) can be temporarily saved, and the number of times the gimbal is in a stationary state is recorded plus 1.
[0116] When the data meets the calibration conditions, such as the number of times the gimbal is in a stationary state is recorded to be 6, the MCU will automatically trigger the calibration algorithm, calculate the calibration parameters and perform automatic verification, then overwrite the calibration parameters originally saved in the flash and update the calibration parameters.
[0117] 4. Gyroscope calibration model
[0118] Gyroscopes are usually used to integrate to solve attitude angles. Therefore, gyroscope calibration mainly considers its zero bias. If there is a large zero bias, long-term integration will produce a large cumulative error, which will seriously affect the accuracy of the attitude angle.
[0119] The zero bias of a gyroscope has the following characteristics: First, the system zero deviation generated by the production of the device itself is generally a fixed value; second, the uncertain zero deviation caused by environmental interference. Environmental interference includes electromagnetic, temperature, humidity, motion state, etc. These interferences are unmeasurable and unpredictable, and are random interferences.
[0120] Therefore, in order to improve the accuracy of gyroscope calibration, the motion state of the gimbal to be calibrated can be detected cyclically. When it is determined that the gimbal to be calibrated is in a stationary state, the gyroscope data at this time is recorded, and then the average is calculated as the current gyroscope zero bias. The zero bias is brought into the gyroscope data for self-detection. After success, it is written to the flash as the latest gyroscope zero bias data, and the gyroscope of the gimbal to be calibrated is calibrated based on the latest gyroscope zero bias.
[0121] It should be noted that when the gimbal automatically updates the calibration parameters, it can be reported to the host computer to prompt the user that the calibration parameters have been automatically updated and recorded in the log.
[0122] The method provided by the present application is described above. The device provided by the present application is described below:
[0123] See also Figure 4 , is a schematic diagram of the structure of a pan-tilt dynamic calibration device provided in an embodiment of the present application, such as Figure 4 As shown, the pan / tilt dynamic calibration device may include:
[0124] An acquisition unit 410 is used to periodically acquire the inertial measurement unit (IMU) data of the gimbal to be calibrated within a set time;
[0125] A determination unit 420 is used to determine whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data;
[0126] The calibration unit 430 is configured to perform accelerometer calibration and gyroscope calibration on the gimbal to be calibrated according to the acquired IMU data when the determining unit 420 determines that the gimbal to be calibrated is in a stationary state.
[0127] In some embodiments, Figure 5 As shown, the pan / tilt dynamic calibration device may further include:
[0128] A data filtering unit 440 is used to filter the acquired IMU data to remove abnormal data in the acquired IMU data to obtain filtered IMU data;
[0129] The determining unit 420 determines whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data, including:
[0130] Determining whether the gimbal to be calibrated is in a stationary state according to the filtered IMU data;
[0131] The calibration unit 430 performs accelerometer calibration and gyroscope calibration on the gimbal to be calibrated according to the acquired IMU data, including:
[0132] The accelerometer and gyroscope of the gimbal to be calibrated are calibrated according to the filtered IMU data.
[0133] In some embodiments, the determining unit 420 determines whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data, including:
[0134] Determine the acceleration modulus mean and the angular velocity modulus mean according to the acquired IMU data;
[0135] When the acceleration modulus mean is less than a first threshold value, and the angular velocity modulus mean is less than a second threshold value, it is determined that the gimbal to be calibrated is in a stationary state.
[0136] In some embodiments, the determination unit 420 is further used to save the acceleration data in the acquired IMU data when it is determined that the gimbal to be calibrated is in a stationary state, and add 1 to the recorded number of times that the gimbal to be calibrated is in a stationary state; determine whether the recorded number of times that the gimbal to be calibrated is in a stationary state reaches a third threshold; wherein the third threshold is greater than or equal to 6;
[0137] The calibration unit 430 is specifically configured to perform accelerometer calibration on the gimbal to be calibrated according to the acquired IMU data and reset the recorded number of times the gimbal to be calibrated is in a stationary state when the recorded number of times the gimbal to be calibrated is in a stationary state reaches the third threshold.
[0138] In some embodiments, the calibration unit 430 performs accelerometer calibration on the gimbal to be calibrated according to the acquired IMU data, including:
[0139] According to the stored acceleration data, the installation angle error, the digital-to-analog conversion factor error and the dynamic error of the accelerometer are determined respectively; wherein the dynamic error includes a zero deviation and a random error, and the dynamic error changes with the difference of the random error;
[0140] The accelerometer of the gimbal to be calibrated is calibrated according to the installation angle error, the digital-to-analog conversion factor error and the dynamic error of the accelerometer.
[0141] In some embodiments, the calibration unit performs gyroscope calibration on the gimbal to be calibrated according to the acquired IMU data, including:
[0142] Determine the mean value of the angular velocity data in the acquired IMU data as the current gyroscope zero bias;
[0143] Verifying the current gyroscope zero bias;
[0144] When the verification is passed, the current gyroscope zero bias is used as the latest gyroscope zero bias, and the gyroscope of the gimbal to be calibrated is calibrated according to the latest gyroscope zero bias.
[0145] Correspondingly, the present application also provides Figure 4 or Figure 5 The hardware structure of the device shown. Figure 6The hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.
[0146] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented.
[0147] Exemplarily, the above-mentioned machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0148] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0149] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A pan / tilt dynamic calibration method, characterized in that: include: Regularly obtain the IMU data of the gimbal to be calibrated within the set time; Determining whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data; When it is determined that the gimbal to be calibrated is in a stationary state, performing accelerometer calibration and gyroscope calibration on the gimbal to be calibrated according to the acquired IMU data; Wherein, when it is determined that the gimbal to be calibrated is in a stationary state, before calibrating the accelerometer of the gimbal to be calibrated according to the acquired IMU data, the method further includes: Saving the acceleration data in the acquired IMU data, and adding 1 to the recorded number of times the gimbal to be calibrated is in a stationary state; Determine whether the recorded number of times that the gimbal to be calibrated is in a stationary state reaches a third threshold; wherein the third threshold is greater than or equal to 6; When the recorded number of times the gimbal to be calibrated is in a stationary state reaches the third threshold, it is determined to execute the operation of calibrating the accelerometer of the gimbal to be calibrated according to the acquired IMU data, and the recorded number of times the gimbal to be calibrated is in a stationary state is reset.
2. The method according to claim 1, characterized in that Before determining whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data, the method further includes: Filtering the acquired IMU data to remove abnormal data in the acquired IMU data to obtain filtered IMU data; The step of determining whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data includes: Determining whether the gimbal to be calibrated is in a stationary state according to the filtered IMU data; The step of performing accelerometer calibration and gyroscope calibration on the gimbal to be calibrated according to the acquired IMU data includes: The accelerometer and gyroscope of the gimbal to be calibrated are calibrated according to the filtered IMU data.
3. The method according to claim 1, characterized in that The step of determining whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data includes: Determine the acceleration modulus mean and the angular velocity modulus mean according to the acquired IMU data; When the acceleration modulus mean is less than a first threshold value, and the angular velocity modulus mean is less than a second threshold value, it is determined that the gimbal to be calibrated is in a stationary state.
4. The method according to claim 1, characterized in that: The accelerometer calibration of the gimbal to be calibrated according to the acquired IMU data includes: According to the stored acceleration data, the installation angle error, the digital-to-analog conversion factor error and the dynamic error of the accelerometer are determined respectively; wherein the dynamic error includes a zero deviation and a random error, and the dynamic error changes with the difference of the random error; The accelerometer of the gimbal to be calibrated is calibrated according to the installation angle error, the digital-to-analog conversion factor error and the dynamic error of the accelerometer.
5. The method according to claim 1, characterized in that The step of performing gyroscope calibration on the gimbal to be calibrated according to the acquired IMU data includes: Determine the mean value of the angular velocity data in the acquired IMU data as the current gyroscope zero bias; Verifying the current gyroscope zero bias; When the verification is passed, the current gyroscope zero bias is used as the latest gyroscope zero bias, and the gyroscope of the gimbal to be calibrated is calibrated according to the latest gyroscope zero bias.
6. A pan / tilt dynamic calibration device, characterized in that: include: An acquisition unit is used to periodically acquire the IMU data of the gimbal to be calibrated within a set time; A determination unit, configured to determine whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data; a calibration unit, configured to perform accelerometer calibration and gyroscope calibration on the gimbal to be calibrated according to the acquired IMU data when the determination unit determines that the gimbal to be calibrated is in a stationary state; Wherein, the determination unit is further used to save the acceleration data in the acquired IMU data when it is determined that the gimbal to be calibrated is in a stationary state, and add 1 to the recorded number of times that the gimbal to be calibrated is in a stationary state; determine whether the recorded number of times that the gimbal to be calibrated is in a stationary state reaches a third threshold; wherein the third threshold is greater than or equal to 6; The calibration unit is specifically used to calibrate the accelerometer of the gimbal to be calibrated according to the acquired IMU data and reset the recorded number of times the gimbal to be calibrated is in a stationary state when the recorded number of times the gimbal to be calibrated is in a stationary state reaches the third threshold.
7. The device according to claim 6, characterized in that The device also includes: A data filtering unit, used for filtering the acquired IMU data to remove abnormal data in the acquired IMU data to obtain filtered IMU data; The determining unit determines whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data, including: Determining whether the gimbal to be calibrated is in a stationary state according to the filtered IMU data; The calibration unit performs accelerometer calibration and gyroscope calibration on the gimbal to be calibrated according to the acquired IMU data, including: The accelerometer and gyroscope of the gimbal to be calibrated are calibrated according to the filtered IMU data.
8. The device according to claim 6, characterized in that The determining unit determines whether the gimbal to be calibrated is in a stationary state according to the acquired IMU data, including: Determine the acceleration modulus mean and the angular velocity modulus mean according to the acquired IMU data; When the acceleration modulus mean is less than a first threshold value, and the angular velocity modulus mean is less than a second threshold value, it is determined that the gimbal to be calibrated is in a stationary state.
9. The device according to claim 6, characterized in that The calibration unit performs accelerometer calibration on the gimbal to be calibrated according to the acquired IMU data, including: According to the stored acceleration data, the installation angle error, the digital-to-analog conversion factor error and the dynamic error of the accelerometer are determined respectively; wherein the dynamic error includes a zero deviation and a random error, and the dynamic error changes with the difference of the random error; The accelerometer of the gimbal to be calibrated is calibrated according to the installation angle error, the digital-to-analog conversion factor error and the dynamic error of the accelerometer.
10. The device according to claim 6, characterized in that The calibration unit performs gyroscope calibration on the gimbal to be calibrated according to the acquired IMU data, including: Determine the mean value of the angular velocity data in the acquired IMU data as the current gyroscope zero bias; Verifying the current gyroscope zero bias; When the verification is passed, the current gyroscope zero bias is used as the latest gyroscope zero bias, and the gyroscope of the gimbal to be calibrated is calibrated according to the latest gyroscope zero bias.
11. An electronic device, characterized in that: The electronic device includes: A processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method steps of any one of claims 1-5.
Citation Information
Patent Citations
Acceleration sensor calibrating method and mobile terminal
CN103399175A
Method and apparatus for calibrating gyroscope in wireless mouse
CN104634365A
Method for correcting gyroscope data and device thereof
CN106568460A
Calibration method of gyroscope zero drift
CN108195404A
Calibration method and calibration device for accelerometer
CN111913007A
