Calibration method and device of unmanned aerial vehicle holder and electronic equipment
By controlling the frame axis of the UAV gimbal to enter a free state, applying initial angular displacement and performing data fitting, the zero-position deviation is automatically calculated, solving the problems of complex and low accuracy of zero-position calibration in the existing technology, realizing efficient and accurate zero-position calibration, applicable to all degrees of freedom of the UAV gimbal.
Patent Information
- Application Number
- CN202512043659.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-12-31
AI Technical Summary
In existing technologies, the zero-point calibration process of UAV gimbal angle sensors is complex, has low accuracy, and is prone to collisions with the ground, making it difficult to automate and achieve rapid on-site calibration.
By controlling the gimbal frame axis to enter a free state, applying an initial angular displacement to make it undergo free decay oscillation, obtaining the decay response data of the angular displacement, and using a nonlinear least squares optimization algorithm to fit the system model to solve the zero-position deviation, the zero position of the angle sensor is automatically calibrated.
It simplifies the calibration process, reduces the requirements for the operating environment and personnel skills, improves calibration accuracy and reliability, avoids dependence on external equipment and collision risks, and is suitable for uniform calibration of all degrees of freedom.
Smart Images

Figure CN121433334B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of drone calibration technology, and in particular to a calibration method, apparatus and electronic equipment for a drone gimbal. Background Technology
[0002] The gimbal is a key component used to support and stabilize imaging equipment (such as cameras). Its core function is to isolate the impact of drone body vibration and attitude changes on the imaging equipment, ensuring stable and clear images. To achieve precise attitude control and stability, the gimbal system needs to obtain the rotation angles of its frame axes (such as roll axis, pitch axis, and yaw axis) in real time through high-precision angle sensors (such as encoders).
[0003] However, in actual assembly and long-term use, angle sensors inevitably exhibit zero-position deviation. This deviation refers to the fact that when the gimbal frame axis is in a physically zero-position attitude, the angle reading output by the sensor is not zero, but rather a small constant offset. This zero-position deviation directly affects the gimbal's attitude calculation and control accuracy, leading to problems such as decreased stability, inaccurate pointing, image drift, and even accumulated errors.
[0004] In existing technologies, zero-point calibration of gimbal angle sensors typically relies on external auxiliary equipment or specific environmental conditions. For example, high-precision turntables, levels, and other tools are used to mechanically fix the frame axis to be calibrated at a precise zero-point orientation, and then the sensor readings are read and recorded as the zero-point deviation value. This method is cumbersome, time-consuming, and requires specialized equipment and facilities, making it difficult to automate and achieve rapid on-site calibration. Summary of the Invention
[0005] One objective of this application is to provide a calibration method, apparatus, and electronic device for a drone gimbal, in order to solve the problems of complex zero-position calibration process, low accuracy, and easy collision with the ground of the gimbal angle sensor.
[0006] In a first aspect, embodiments of this application provide a calibration method for a drone gimbal, comprising:
[0007] Control the frame axis of the gimbal to enter a free state;
[0008] An initial angular displacement is applied to the frame axis in the free state to cause the frame axis to undergo free damped oscillation;
[0009] Obtain the decay response data sequence of the angular displacement of the frame axis as a function of time during free decay oscillation;
[0010] The attenuation response data sequence is fitted to a preset system model, which includes dynamic parameters for characterizing the moment of inertia and damping ratio of the frame shaft, and constant bias parameters for characterizing the zero-position deviation of the angle sensor.
[0011] Based on the fitting results, the value of the constant bias parameter is calculated as the zero-position calibration value, and the motor of the gimbal is driven according to the zero-position calibration value to make the frame axis rotate and lock in the calibrated zero-position attitude.
[0012] In conjunction with the first aspect, in one possible implementation, the frame axis of the control gimbal enters a free state, including:
[0013] Send a control command to the motor driving the frame shaft to switch the motor from closed-loop servo control mode to open-loop mode;
[0014] In the open-loop mode of the motor, the drive bridge arm of the motor is set to a high-resistance state;
[0015] The armature current or back EMF signal of the motor is monitored. After confirming that the armature current or back EMF signal is continuously lower than a preset small threshold, it is determined that the frame shaft has entered the free state.
[0016] In conjunction with the first aspect, in one possible implementation, applying an initial angular displacement to the frame axis in the free state includes:
[0017] A short-time pulse voltage signal is applied to the motor driving the frame shaft. When the short-time pulse voltage signal is applied, the motor generates electromagnetic torque, which provides an initial angular velocity for the frame shaft. After the short-time pulse voltage signal ends, the electromagnetic torque disappears, and the frame shaft begins to perform the free-dampening oscillation with the initial angular velocity.
[0018] In conjunction with the first aspect, in one possible implementation, acquiring the decay response data sequence of the angular displacement of the frame axis as a function of time during free decay oscillation includes:
[0019] While applying the initial angular displacement, data is sampled using an angle sensor on the frame axis;
[0020] Record the initial readings of the angle sensor to form an initial data sequence;
[0021] The initial data sequence is filtered based on a preset filter, and the cutoff frequency of the filter is higher than the natural oscillation frequency of the frame axis.
[0022] When the oscillation amplitude of the frame axis decays to below a preset amplitude threshold, or when the sampling time of the angle sensor reaches a preset maximum sampling time, sampling stops and the filtered data is stored as the attenuation response data sequence.
[0023] In conjunction with the first aspect, in one possible implementation, fitting the attenuation response data sequence to a preset system model includes:
[0024] The damping ratio and damped natural frequency are determined based on the attenuation response data sequence.
[0025] Using the damping ratio and damped natural frequency as the starting point for iteration, a fitting function with time as the variable is constructed;
[0026] A nonlinear least squares optimization algorithm is used to iteratively optimize the parameters to minimize the overall deviation between the fitting function output and the decay response data sequence. After the iterative optimization stops, the constant bias parameter value output by the fitting function is the calculated zero-point calibration value.
[0027] In conjunction with the first aspect, in one possible implementation, the method further includes:
[0028] The zero-position calibration value obtained from the calculation is stored in the gimbal controller. The gimbal controller performs calibration by subtracting the zero-position calibration value from the raw data of the angle sensor.
[0029] In conjunction with the first aspect, in one possible implementation, the method further includes:
[0030] The original attenuation response data sequence is compensated using the zero-point calibration value obtained from the initial fitting to obtain a new data sequence;
[0031] Based on the new data sequence, the fitting process is performed again to obtain a second zero-point calibration value;
[0032] Calculate the difference between the two zero-point calibration values. If the difference is less than a preset convergence threshold, then the second zero-point calibration value is taken as the final result.
[0033] If the difference is greater than or equal to the convergence threshold, the data compensation and refitting operations are repeated until the difference meets the convergence condition or the preset maximum number of iterations is reached.
[0034] In conjunction with the first aspect, in one possible implementation, the step of driving the motor of the gimbal according to the zero-position calibration value, causing the frame axis to rotate and lock at the calibrated zero-position attitude, includes:
[0035] Determine the target frame axis, which is one of the frame axes of different gimbals;
[0036] When calibrating the target frame axis, make the motors of all other frame axes enter position lock or maintain a constant attitude;
[0037] Before bringing the target frame axis into a free state, drive it to the preset calibration preparation posture;
[0038] After completing the calibration process of the target frame axis, lock it at the calibrated zero position, release it, and begin calibrating the next frame axis.
[0039] After all frame axes have been independently calibrated, the overall coordinate transformation parameters of the gimbal system are updated by combining the zero-point calibration values of each axis.
[0040] In a second aspect, embodiments of this application also provide a calibration device for a drone gimbal, comprising:
[0041] The status control module is used to control the frame axis of the gimbal to enter a free state;
[0042] An oscillation application module is used to apply an initial angular displacement to the frame shaft in the free state, so that the frame shaft can perform free decaying oscillation;
[0043] The data acquisition module is used to acquire the decay response data sequence of the angular displacement of the frame axis as a function of time during free decay oscillation;
[0044] The data fitting module is used to fit the attenuation response data sequence with a preset system model. The system model includes dynamic parameters for characterizing the moment of inertia and damping ratio of the frame shaft, and constant bias parameters for characterizing the zero-position deviation of the angle sensor.
[0045] The data calculation module is used to calculate the value of the constant bias parameter as the zero-position calibration value based on the fitting result, and drive the motor of the gimbal according to the zero-position calibration value, so that the frame axis rotates and locks in the calibrated zero-position attitude.
[0046] In a third aspect, embodiments of this application also propose an electronic device, including a memory and a processor, wherein the memory is connected to the processor, and the processor is configured to execute one or more computer programs stored in the memory, wherein when the processor executes the one or more computer programs, the electronic device implements the calibration method for a drone gimbal as described in the first aspect.
[0047] The embodiments of this application can achieve the following technical effects:
[0048] The embodiments of this application use the dynamic response of the gimbal frame axis itself to identify the zero-position deviation. The entire process can be automatically executed by the gimbal controller without the need for external equipment such as high-precision turntables and levels, which greatly simplifies the calibration process and reduces the requirements for the operating environment and personnel skills.
[0049] Meanwhile, the embodiments of this application nonlinearly fit the actual collected damped oscillation data with a dynamic model containing a zero-position bias to solve the constant bias of the sensor, avoiding errors caused by manual observation or reliance on unstable references (such as a gravitational field), resulting in more accurate and reliable results.
[0050] Furthermore, the embodiments of this application are based on a universal second-order oscillation system model, which is not only applicable to the pitch and roll axes of the gimbal, but also effectively applicable to the yaw axis, which cannot be calibrated using gravity vectors. This achieves unified calibration of all degrees of freedom of the gimbal and can effectively avoid collisions between the gimbal and the ground. Attached Figure Description
[0051] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 A flowchart illustrating a calibration method for a drone gimbal provided in this application embodiment;
[0053] Figure 2 A schematic diagram of the frame of a calibration device for a drone gimbal provided in an embodiment of this application;
[0054] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0056] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the system diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the system or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0057] Figure 1 A flowchart illustrating a calibration method for a drone gimbal according to an embodiment of this application is shown. Figure 1 As shown, the above method includes steps S10-S50:
[0058] Step S10: Control the frame axis of the gimbal to enter a free state;
[0059] Step S20: Apply an initial angular displacement to the frame shaft in the free state to cause the frame shaft to undergo free damped oscillation;
[0060] Step S30: Obtain the decay response data sequence of the angular displacement of the frame axis as a function of time during free decay oscillation;
[0061] Step S40: Fit the attenuation response data sequence to a preset system model. The system model includes dynamic parameters for characterizing the moment of inertia and damping ratio of the frame shaft, and constant bias parameters for characterizing the zero-position deviation of the angle sensor.
[0062] Step S50: Based on the fitting results, calculate the value of the constant bias parameter as the zero-position calibration value, and drive the motor of the gimbal according to the zero-position calibration value to rotate the frame axis and lock it in the calibrated zero-position attitude.
[0063] This embodiment primarily addresses a single frame axis (e.g., pitch, roll, or yaw) in a three-axis gimbal for a UAV. Typically, the pitch and roll axes inherently possess gravitational imbalance torques, while the yaw axis, if well-balanced, may not exhibit free oscillations. Therefore, an additional virtual torque (controlled by a motor) is required to simulate the oscillation environment.
[0064] This embodiment uses the pitch axis as an example for illustration. The flight control or gimbal controller of the UAV must have at least the following functions:
[0065] Controlling the torque output of the gimbal motor allows the motor to be set to zero torque or high resistance state, i.e., the free state mentioned above.
[0066] It can read data from angle sensors (such as encoders or IMUs) in real time at a certain sampling frequency (e.g., 200Hz - 1000Hz).
[0067] Based on this, the gimbal controller stops the PID control of the pitch axis motor through software instructions and sets the output current of the motor driver to zero. This makes the pitch axis frame (i.e., the part that carries the camera) no longer affected by the active control torque of the motor, and moves only under the action of gravity (if there is an imbalance of the center of gravity), frictional damping and its own inertia.
[0068] For example, the gimbal controller can use motor control to put all phase MOSFET drives in a closed or high-impedance state, allowing them to rotate freely.
[0069] In this embodiment, after the frame axis is in a free state, the gimbal controller immediately applies a brief torque pulse or angle pulse to the motor as its initial angular displacement. For example, a constant torque with a very short duration (e.g., 10-20 milliseconds) can be applied to the motor, and then the torque can be immediately withdrawn to restore it to a free state.
[0070] In this embodiment, initial energy is injected into the system by applying an initial angular displacement, causing it to start moving from an initial position that deviates from its natural equilibrium point, thereby generating damped oscillations. This oscillation process further includes all dynamic information related to its deviation.
[0071] The initial angular displacement should not be too large to avoid hitting the physical limits of the gimbal or entering the nonlinear region; nor should it be too small to avoid weak oscillation signals and low signal-to-noise ratio. Due to the differences in UAV models and structures, the division of the initial angular displacement is difficult to be universally applicable, so this embodiment does not provide an example. However, ideally, the angular displacement should be as small as possible.
[0072] In this embodiment, a timer is started at the instant the initial displacement is applied and the frame axis is released, and data from the pitch axis angle sensor is continuously acquired at a fixed high frequency (e.g., 500Hz) for a sufficient period of time until the oscillation amplitude decays to near the sensor noise level, typically 2-5 seconds.
[0073] Specifically, each pair of (timestamp, angle value) data is stored in an array or list in memory. For example:
[0074] Data_Sequence=[(t_0,θ_0),(t_1,θ_1),(t_2,θ_2),...,(t_n,θ_n)].
[0075] Generally speaking, the curve of the collected angle θ changing with time t will present as a damped oscillation waveform, and its oscillation center may not be zero.
[0076] Based on this, this embodiment performs data fitting and parameter calculation.
[0077] The free oscillation of the gimbal frame axis can be modeled as a second-order linear time-invariant system model, and the solution of its equation of motion (i.e., the angle as a function of time) is:
[0078] ;
[0079] in, This is the angle value predicted by the system model at time t, where A is the initial amplitude of the oscillation. The damping ratio is related to the frictional damping of the frame shaft;
[0080] The undamped natural frequency is related to the moment of inertia J of the frame shaft and the equivalent spring stiffness k generated by the unbalanced torque, and satisfies:
[0081] ;
[0082] Let be the damped oscillation frequency, satisfying:
[0083] , C is the phase constant, and C is the constant bias parameter, which is the position of the equilibrium center of the oscillation, that is, the deviation between the zero reading of the angle sensor and the actual physical zero position (gravity equilibrium point), and serves as the final target of the solution.
[0084] In this embodiment, a nonlinear least squares algorithm (such as the Levenberg-Marquardt algorithm) can be used to combine the decay response data sequence Data_Sequence with the above system model. Perform fitting.
[0085] The fitting objective is to find a set of optimal parameters (A, , , C) minimizes the sum of squared errors between the model's predicted values and the actual measured values:
[0086] .
[0087] For example, the gimbal controller can call existing numerical computing libraries (such as relevant functions in the CMSIS-DSP library) or use an iterative solver based on Levenberg-Marquardt to perform fitting calculations and provide a reasonable initial guess value for the parameters to be solved to start the iteration. This embodiment does not limit the specific solution process.
[0088] After the fitting process is completed, a set of optimal parameters is obtained. In this embodiment, the constant bias parameter C is used as the final zero-point calibration value.
[0089] For example, if the fitted value is C = -0.35 degrees, this means that the gimbal's pitch axis is in a true horizontal position when the sensor reading is -0.35 degrees.
[0090] Based on this, the PTZ controller can store the calculated zero-position calibration value C in a non-volatile memory (such as Flash or EEPROM) so that it can be used directly the next time it is powered on.
[0091] During calibration, the gimbal controller restarts PID control. The PID controller drives the motor to rotate the pitch axis until the angle sensor reading stabilizes at the C value. The motor continuously outputs torque to stably hold the frame axis in this position, at which point the gimbal is aligned to the true horizontal zero point.
[0092] In all subsequent gimbal control operations, the true attitude angle is obtained by subtracting the calibration value C from the raw sensor readings, or by adding C to all target angles. That is:
[0093] True angle = Sensor reading - C;
[0094] Alternatively, PID error = (target angle + C) - sensor reading.
[0095] In a preferred embodiment, the frame axis of the control gimbal enters a free state, including:
[0096] Send a control command to the motor driving the frame shaft to switch the motor from closed-loop servo control mode to open-loop mode;
[0097] In the open-loop mode of the motor, the drive bridge arm of the motor is set to a high-resistance state;
[0098] The armature current or back EMF signal of the motor is monitored. After confirming that the armature current or back EMF signal is continuously lower than a preset small threshold, it is determined that the frame shaft has entered the free state.
[0099] In this embodiment, the gimbal controller sends a specific command to the motor driver that drives the target frame axis via a communication interface (such as PWM, CAN, or UART), instructing it to switch from the default position loop or speed loop closed-loop servo mode to an open-loop mode. In open-loop mode, the driver no longer performs closed-loop control based on feedback from the angle sensor.
[0100] After the open-loop mode is activated, the PTZ controller sends a further command to turn off all power transistors in the H-bridge or three-phase bridge of the motor driver, making each phase input of the motor present a high-impedance state. At this time, the armature winding of the motor is almost electrically disconnected from the drive circuit.
[0101] Based on this, the gimbal controller monitors the current signal of the motor phase line or the signal derived from its back electromotive force through the ADC channel.
[0102] In this embodiment, a small threshold is preset (for example, corresponding to a current <10mA or a back electromotive force <0.1V). When the monitored signal remains below this small threshold for a period of time (e.g., 500ms), it is determined that the influence of mechanical friction and electromagnetic damping has been reduced to a minimum, and the frame shaft is in a free state that can rotate freely.
[0103] In a preferred embodiment, applying an initial angular displacement to the frame axis in its free state includes:
[0104] A short-time pulse voltage signal is applied to the motor driving the frame shaft. When the short-time pulse voltage signal is applied, the motor generates electromagnetic torque, which provides an initial angular velocity for the frame shaft. After the short-time pulse voltage signal ends, the electromagnetic torque disappears, and the frame shaft begins to perform the free-dampening oscillation with the initial angular velocity.
[0105] In this embodiment, after confirming that the frame axis has entered a free state, the gimbal controller sends a command to the motor driver to apply a short-duration unidirectional pulse voltage. The pulse width is typically 10-100 milliseconds, and the voltage amplitude is 20%-50% of the motor's rated voltage.
[0106] The pulsed voltage generates a brief electromagnetic torque in the motor, causing the frame shaft to accelerate. After the pulse ends, the torque immediately disappears, and the frame shaft begins to move based on the initial angular momentum gained (manifested as an initial angular velocity). Due to the damping of the system at this point, this motion will exhibit free-dampening oscillations.
[0107] In a preferred embodiment, acquiring the decay response data sequence of angular displacement changing over time during the free decay oscillation process via an angle sensor on the frame axis includes:
[0108] Simultaneously with applying the initial angular displacement, the angle sensor is triggered to sample data; the original readings of the angle sensor are recorded to form an initial data sequence; the initial data sequence is filtered based on a preset filter, the cutoff frequency of which is higher than the inherent oscillation frequency of the frame axis; when the oscillation amplitude of the frame axis decays to below a preset amplitude threshold, or when the sampling time of the angle sensor reaches a preset maximum sampling time, sampling is stopped and the filtered data is stored as the attenuation response data sequence.
[0109] In this embodiment, at the same moment the initial pulse voltage is applied, the gimbal controller triggers the angle sensor (such as an encoder or potentiometer) connected to the frame axis to start high-speed sampling (the sampling frequency is much higher than the system's inherent frequency), and synchronously records the time of each sampling point.
[0110] The pan-tilt controller reads and stores the raw AD values or digital quantities from the sensors to form an initial data sequence. Subsequently, this initial data sequence is passed through a digital filter (such as a Butterworth low-pass filter). The cutoff frequency of the filter is set according to the mechanical characteristics of the frame shaft and needs to be 1-2 orders of magnitude higher than the estimated natural oscillation frequency to filter out high-frequency noise (such as electrical noise and vibration noise) while completely preserving the oscillation signal.
[0111] During the sampling process, the PTZ controller calculates the peak value of the oscillation in real time. When it detects that the oscillation amplitude has decayed to below a preset threshold (such as less than 1% of the initial amplitude) for several consecutive cycles, it determines that the effective oscillation has ended.
[0112] Meanwhile, to prevent infinite sampling due to unexpected situations, a maximum sampling duration (e.g., 10 seconds) can be set, and the sampling will be forcibly stopped once this duration is reached.
[0113] Once any condition is met, sampling stops, and the filtered and time-aligned data is finally stored as a decay response data sequence for fitting.
[0114] As a preferred embodiment, fitting the attenuation response data sequence to a preset system model includes:
[0115] The damping ratio and damped natural frequency are determined based on the attenuation response data sequence.
[0116] Using the damping ratio and damped natural frequency as the starting point for iteration, a fitting function with time as the variable is constructed;
[0117] A nonlinear least squares optimization algorithm is used to iteratively optimize the parameters to minimize the overall deviation between the fitting function output and the decay response data sequence. After the iterative optimization stops, the constant bias parameter value output by the fitting function is the calculated zero-point calibration value.
[0118] Specifically, this embodiment first analyzes the acquired attenuation response data sequence. For example, the attenuation ratio of adjacent peak amplitudes can be calculated by peak detection to estimate the damping ratio of the system. At the same time, the damped natural frequency can be calculated by measuring the period of the oscillation waveform.
[0119] In this embodiment, the form of constructing the fitting function is as follows:
[0120] ;
[0121] in, Let θ be the angular displacement at time t, and A be the initial amplitude. For the initial phase, For the damping ratio, Where is the undamped natural frequency, and B is the constant bias parameter to be solved in this embodiment. is the damped oscillation frequency.
[0122] The estimated values in the above embodiments and As the initial value for nonlinear optimization iteration.
[0123] In this embodiment, a nonlinear least squares algorithm (such as the Levenberg-Marquardt algorithm) is used, with the decay response data sequence as the observation and the fitted function as the model. The undetermined parameters (A, , , The value of parameter B in the fitting function is determined so that the sum of squared residuals between the model output sequence and the observed data sequence is minimized. When the optimization algorithm stops meeting the convergence condition (such as the change in parameters or the change in residuals being less than the set tolerance), the value of parameter B in the fitting function is solved as the zero-point calibration value.
[0124] As a preferred embodiment, the above embodiments further include:
[0125] The zero-position calibration value obtained from the calculation is stored in the gimbal controller. The gimbal controller performs calibration by subtracting the zero-position calibration value from the raw data of the angle sensor.
[0126] In this embodiment, the calculated zero-point calibration value is written to a designated storage area in its non-volatile memory (such as Flash). During subsequent normal operation of the gimbal, whenever the raw reading of the frame axis angle sensor is read... At that time, perform calibration calculations:
[0127] ;
[0128] Received This is the angle value with zero-position deviation corrected, used for all subsequent servo control, attitude calculation and data output.
[0129] As a preferred embodiment, the method of this embodiment further includes:
[0130] The original attenuation response data sequence is compensated using the zero-point calibration value obtained from the initial fitting to obtain a new data sequence;
[0131] Based on the new data sequence, the fitting process is performed again to obtain a second zero-point calibration value;
[0132] Calculate the difference between the two zero-point calibration values. If the difference is less than a preset convergence threshold, then the second zero-point calibration value is taken as the final result.
[0133] If the difference is greater than or equal to the convergence threshold, the data compensation and refitting operations are repeated until the difference meets the convergence condition or the preset maximum number of iterations is reached.
[0134] In this embodiment, the original attenuation response data sequence is compensated using the zero-point calibration value B1 obtained from the first fitting, to obtain a new sequence S_new1 = S_orig - B1.
[0135] Using S_new1 as input, repeat the fitting process of the above embodiment to obtain the second zero-position calibration value B2, and calculate the difference between the two results ΔB = |B2 - B1|.
[0136] If ΔB is less than the preset convergence threshold (for example, the corresponding angle value is less than 0.01 degrees), then convergence is considered to have been achieved, and B2 is used as the final zero-position calibration value.
[0137] If ΔB is greater than or equal to the convergence threshold, then B2 is used as the new compensation value to generate S_new2, and B3 is obtained by fitting again, and this process is repeated.
[0138] The iteration will continue until the difference meets the convergence condition or reaches the preset maximum number of iterations (e.g., 10 times) to prevent the loop from getting stuck if it does not converge.
[0139] In a preferred embodiment, the step of driving the motor of the gimbal according to the zero-position calibration value, causing the frame axis to rotate and lock in the calibrated zero-position attitude, includes:
[0140] Determine the target frame axis, which is one of the frame axes of different gimbals;
[0141] When calibrating the target frame axis, make the motors of all other frame axes enter position lock or maintain a constant attitude;
[0142] Before bringing the target frame axis into a free state, drive it to the preset calibration preparation posture;
[0143] After completing the calibration process of the target frame axis, lock it at the calibrated zero position, release it, and begin calibrating the next frame axis.
[0144] After all frame axes have been independently calibrated, the overall coordinate transformation parameters of the gimbal system are updated by combining the zero-point calibration values of each axis.
[0145] Specifically, assume the gimbal has three frame axes: pitch, roll, and yaw. When the pitch axis needs to be calibrated:
[0146] The gimbal controller first controls the roll axis and yaw axis motors to enter position lock mode (maintain current angle) or torque hold mode, so that their attitude remains constant during pitch axis calibration and avoids mutual interference.
[0147] Subsequently, the pitch axis is driven to a preset calibration preparation attitude (e.g., near the horizontal position), and the calibration process described in the above embodiment is performed only on the pitch axis;
[0148] After pitch axis calibration is completed, the gimbal controller drives its motors to rotate the pitch axis and lock it at the calibrated physical zero position. Next, the roll axis is released and the calibrated pitch and yaw axes are locked, and the roll axis undergoes an independent calibration process... The yaw axis calibration process is repeated in this manner.
[0149] After all the frame axes have been calibrated independently, the zero-position calibration values of each axis are combined and the coordinate transformation matrix or zero-position offset table of the gimbal system is updated in a unified manner, thereby constructing an overall coordinate system with consistent zero positions for each axis.
[0150] Please refer to Figure 2 This application also proposes a calibration device for a drone gimbal, comprising:
[0151] The state control module 210 is used to control the frame axis of the gimbal to enter the free state;
[0152] The oscillation application module 220 is used to apply an initial angular displacement to the frame shaft in the free state so that the frame shaft can perform free decaying oscillation;
[0153] Data acquisition module 230 is used to acquire the decay response data sequence of the angular displacement of the frame axis as a function of time in free decay oscillation;
[0154] The data fitting module 240 is used to fit the attenuation response data sequence with a preset system model. The system model includes dynamic parameters for characterizing the moment of inertia and damping ratio of the frame shaft, and constant bias parameters for characterizing the zero-position deviation of the angle sensor.
[0155] The data calculation module 250 is used to calculate the value of the constant bias parameter as the zero-position calibration value based on the fitting result, and drive the motor of the gimbal according to the zero-position calibration value to make the frame axis rotate and lock in the calibrated zero-position attitude.
[0156] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process and related descriptions of the device described above can be found in the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0157] Furthermore, see Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 60 includes one or more processors 61 and a memory 62. The memory 62 is connected to one or more processors 61, for example, via a bus.
[0158] Processor 61 is configured to support the electronic device in performing the corresponding functions in the methods described in the above method embodiments. Processor 61 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0159] Memory 62 is used to store program code, etc. Memory 62 may include volatile memory (VM), such as random access memory (RAM); memory 62 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 62 may also include combinations of the above types of memory.
[0160] The memory 62 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the drone gimbal calibration method in this embodiment. The processor 61 executes various functional applications and data processing of the drone gimbal calibration method and UI interface generation system by running the non-volatile software programs, instructions, and modules stored in the memory 62, thereby realizing the functions of each module or unit of the drone gimbal calibration method and UI interface generation system provided in the above method embodiments.
[0161] The memory 62 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function. The data storage area may store data created based on the use of the UI interface generation system. In some embodiments, the memory 62 may optionally include memory remotely located relative to the processor 61, and this remote memory may be connected to the UI interface generation device 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.
[0162] One or more modules are stored in memory 62. When executed by one or more processors 61, they perform the calibration method of the UAV gimbal in any of the above method embodiments. For example, they perform the method steps described in the above method embodiments to realize the functions of the modules described in the above system embodiments.
[0163] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When executed by a processor of an electronic device, the program instructions cause the processor to perform the calibration method for a drone gimbal as described in the foregoing embodiments.
[0164] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0165] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A calibration method for a drone gimbal, characterized in that, include: Control the frame axis of the gimbal to enter a free state; An initial angular displacement is applied to the frame axis in the free state to cause the frame axis to undergo free damped oscillation; Obtain the decay response data sequence of the angular displacement of the frame axis as a function of time during free decay oscillation; The attenuation response data sequence is fitted to a preset system model, which includes dynamic parameters for characterizing the moment of inertia and damping ratio of the frame shaft, and constant bias parameters for characterizing the zero-position deviation of the angle sensor. Based on the fitting results, the value of the constant bias parameter is calculated as the zero-position calibration value, and the motor of the gimbal is driven according to the zero-position calibration value to make the frame axis rotate and lock in the calibrated zero-position attitude.
2. The calibration method for a UAV gimbal according to claim 1, characterized in that, The frame axis of the control gimbal enters a free state, including: Send a control command to the motor driving the frame shaft to switch the motor from closed-loop servo control mode to open-loop mode; In the open-loop mode of the motor, the drive bridge arm of the motor is set to a high-resistance state; The armature current or back EMF signal of the motor is monitored. After confirming that the armature current or back EMF signal is continuously lower than a preset small threshold, it is determined that the frame shaft has entered the free state.
3. The calibration method for a UAV gimbal according to claim 1, characterized in that, Applying an initial angular displacement to the frame axis in the free state includes: A short-time pulse voltage signal is applied to the motor driving the frame shaft. When the short-time pulse voltage signal is applied, the motor generates electromagnetic torque, which provides an initial angular velocity for the frame shaft. After the short-time pulse voltage signal ends, the electromagnetic torque disappears, and the frame shaft begins to perform the free-dampening oscillation with the initial angular velocity.
4. The calibration method for a UAV gimbal according to claim 1, characterized in that, The acquisition of the decay response data sequence of the angular displacement of the frame axis as a function of time in free decaying oscillation includes: While applying the initial angular displacement, data is sampled using an angle sensor on the frame axis; Record the initial readings of the angle sensor to form an initial data sequence; The initial data sequence is filtered based on a preset filter, and the cutoff frequency of the filter is higher than the natural oscillation frequency of the frame axis. When the oscillation amplitude of the frame axis decays to below a preset amplitude threshold, or when the sampling time of the angle sensor reaches a preset maximum sampling time, sampling stops and the filtered data is stored as the attenuation response data sequence.
5. The calibration method for a UAV gimbal according to claim 1, characterized in that, The step of fitting the attenuation response data sequence with a preset system model includes: The damping ratio and damped natural frequency are determined based on the attenuation response data sequence. Using the damping ratio and damped natural frequency as the starting point for iteration, a fitting function with time as the variable is constructed; A nonlinear least squares optimization algorithm is used to iteratively optimize the parameters to minimize the overall deviation between the fitting function output and the decay response data sequence. After the iterative optimization stops, the constant bias parameter value output by the fitting function is the calculated zero-point calibration value.
6. The calibration method for a UAV gimbal according to claim 1, characterized in that, The method further includes: The zero-position calibration value obtained from the calculation is stored in the gimbal controller. The gimbal controller performs calibration by subtracting the zero-position calibration value from the raw data of the angle sensor.
7. The calibration method for a UAV gimbal according to claim 1, characterized in that, The method further includes: The original attenuation response data sequence is compensated using the zero-point calibration value obtained from the initial fitting to obtain a new data sequence; Based on the new data sequence, the fitting process is performed again to obtain a second zero-point calibration value; Calculate the difference between the two zero-point calibration values. If the difference is less than a preset convergence threshold, then the second zero-point calibration value is taken as the final result. If the difference is greater than or equal to the convergence threshold, the data compensation and refitting operations are repeated until the difference meets the convergence condition or the preset maximum number of iterations is reached.
8. The calibration method for a UAV gimbal according to claim 1, characterized in that, The step of driving the motor of the gimbal according to the zero-position calibration value, causing the frame axis to rotate and lock in the calibrated zero-position attitude, includes: Determine the target frame axis, which is one of the frame axes of different gimbals; When calibrating the target frame axis, make the motors of all other frame axes enter position lock or maintain a constant attitude; Before bringing the target frame axis into a free state, drive it to the preset calibration preparation posture; After completing the calibration process of the target frame axis, lock it at the calibrated zero position, release it, and begin calibrating the next frame axis. After all frame axes have been independently calibrated, the overall coordinate transformation parameters of the gimbal system are updated by combining the zero-point calibration values of each axis.
9. A calibration device for a drone gimbal, characterized in that, include: The status control module is used to control the frame axis of the gimbal to enter a free state; An oscillation application module is used to apply an initial angular displacement to the frame shaft in the free state, so that the frame shaft can perform free decaying oscillation; The data acquisition module is used to acquire the decay response data sequence of the angular displacement of the frame axis as a function of time during free decay oscillation; The data fitting module is used to fit the attenuation response data sequence with a preset system model. The system model includes dynamic parameters for characterizing the moment of inertia and damping ratio of the frame shaft, and constant bias parameters for characterizing the zero-position deviation of the angle sensor. The data calculation module is used to calculate the value of the constant bias parameter as the zero-position calibration value based on the fitting result, and drive the motor of the gimbal according to the zero-position calibration value, so that the frame axis rotates and locks in the calibrated zero-position attitude.
10. An electronic device, characterized in that, The device includes a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, the processor causing the electronic device to implement the calibration method for a drone gimbal as described in any one of claims 1-8 when executing the one or more computer programs.
Citation Information
Patent Citations
Method for suppressing vibration of pan-tilt, and pan-tilt
CN110393006A
Calibration method and system for non-orthogonal error of gyroscope
CN110411481A