Calibration method and device of unmanned aerial vehicle holder and electronic equipment
By controlling the drone gimbal frame axis to enter a free state, applying initial angular displacement and fitting attenuation response data, and calculating the zero-position calibration value, the problems of complexity and insufficient accuracy of gimbal angle sensor zero-position calibration are solved, and efficient and accurate automated calibration is achieved.
Patent Information
- Application Number
- CN202512043659.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-12-31
AI Technical Summary
The zero-point calibration process of the angle sensor of the drone gimbal is complex, has low accuracy, and is prone to collision 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 perform free decay oscillation, obtaining the decay response data sequence and fitting it with the preset system model, calculating the zero-position calibration value, and driving the motor to lock at the calibrated zero-position attitude.
It simplifies the calibration process, reduces the requirements for the operating environment and personnel skills, improves calibration accuracy and reliability, avoids collisions, and is suitable for uniform calibration of all degrees of freedom.
Smart Images

Figure CN121433334A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of unmanned aerial vehicle calibration, and particularly relates to a calibration method and device for an unmanned aerial vehicle gimbal and an electronic device. BACKGROUND
[0002] An unmanned aerial vehicle gimbal is a key component for carrying and stabilizing an imaging device (such as a camera), and its core function is to isolate the influence of unmanned aerial vehicle body vibration and attitude change on the imaging device, to ensure the stability and clarity of the captured image. To achieve accurate attitude control and stabilization, the gimbal system needs to obtain the rotation angle of its frame shaft (such as the roll shaft, the pitch shaft, and the yaw shaft) in real time through a high-precision angle sensor (such as an encoder).
[0003] However, during actual assembly and long-term use, the angle sensor inevitably has a zero offset. The offset refers to that when the gimbal frame shaft is in a physically zero attitude, the angle reading output by the sensor is not zero, but a small constant offset. This zero offset directly affects the attitude calculation and control accuracy of the gimbal, leading to problems such as decreased stabilization performance, inaccurate pointing, image drift, and even accumulated error.
[0004] In the prior art, the zero calibration of the gimbal angle sensor usually 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 shaft to be calibrated at a precise zero attitude, and then the reading of the sensor is recorded as the zero offset value. This method is cumbersome and time-consuming, and requires professional equipment and site, making it difficult to achieve automation and on-site rapid calibration. SUMMARY
[0005] An object of an embodiment of the present application is to provide a calibration method and device for an unmanned aerial vehicle gimbal and an electronic device, to solve the problem of complex zero calibration process, low precision, and easy collision with the ground of the gimbal angle sensor.
[0006] In a first aspect, an embodiment of the present application provides a calibration method for an unmanned aerial vehicle gimbal, comprising: controlling a frame shaft of the gimbal to enter a free state; applying an initial angular displacement to the frame shaft in the free state to make the frame shaft perform free decay oscillation; obtaining a decay response data sequence of the angular displacement of the frame shaft changing with time in the free decay oscillation; fitting the decay response data sequence with a preset system model, the system model including dynamic parameters for characterizing the moment of inertia and damping ratio of the frame shaft, and a constant offset parameter for characterizing the zero offset of the angle sensor; According to the fitting result, a value of the constant bias parameter is calculated as a zero position calibration value, and a motor of the holder is driven according to the zero position calibration value to rotate the frame shaft and lock the frame shaft in a calibrated zero position attitude.
[0007] In combination with the first aspect, in a possible implementation, the control of the frame shaft of the holder into the free state comprises: sending a control instruction to a motor driving the frame shaft to switch the motor from a closed-loop servo control mode to an open-loop mode; in the open-loop mode of the motor, setting a drive bridge arm of the motor to a high resistance state; monitoring an armature current or a back electromotive force signal of the motor, and determining that the frame shaft has entered the free state after confirming that the armature current or the back electromotive force signal continuously falls below a preset small threshold value.
[0008] In combination with the first aspect, in a possible implementation, the initial angular displacement is applied to the frame shaft in the free state, comprising: applying a short-time pulse voltage signal to a motor driving the frame shaft, the short-time pulse voltage signal causes the motor to generate an electromagnetic torque when applied, the electromagnetic torque provides an initial angular velocity for the frame shaft, and after the short-time pulse voltage signal ends, the electromagnetic torque disappears, and the frame shaft starts the free decay oscillation at the initial angular velocity.
[0009] In combination with the first aspect, in a possible implementation, the acquisition of the decay response data sequence of the angular displacement of the frame shaft changing with time in the free decay oscillation comprises: sampling data through an angle sensor on the frame shaft at the same time as the initial angular displacement is applied; recording original readings of the angle sensor to form an initial data sequence; performing filtering processing on the initial data sequence based on a preset filter, and a cutoff frequency of the filter is higher than an inherent oscillation frequency of the frame shaft; when an oscillation amplitude of the frame shaft decays below a preset amplitude threshold value, or a sampling time length of the angle sensor reaches a preset maximum sampling time length, stopping sampling and storing the filtered data as the decay response data sequence.
[0010] In combination with the first aspect, in a possible implementation, the fitting of the decay response data sequence to a preset system model comprises: determining a damping ratio and a damped natural frequency based on the decay response data sequence; taking the damping ratio and the damped natural frequency as an iteration starting point to construct a fitting function with time as a variable; The nonlinear least square optimization algorithm is used to iteratively optimize the to-be-determined parameters, so that the constant bias parameter value of the fitting function output is the zero position calibration value calculated.
[0011] With reference to the first aspect, in a possible implementation, the method further includes: The calculated zero position calibration value is stored in the holder controller, and the holder controller calibrates by reading the original data of the angle sensor and subtracting the zero position calibration value.
[0012] With reference to the first aspect, in a possible implementation, the method further includes: The original decay response data sequence is compensated using the zero position calibration value obtained by the first fitting, to obtain a new data sequence; The fitting process is performed again based on the new data sequence, to obtain a second zero position calibration value; The difference between the two zero position calibration values is calculated, and if the difference is less than a preset convergence threshold, the second zero position calibration value is taken as the final result; If the difference is greater than or equal to the convergence threshold, the data compensation and the re-fitting operation are repeated until the difference meets the convergence condition or a preset maximum iteration number is reached.
[0013] With reference to the first aspect, in a possible implementation, the method further includes: A target frame shaft is determined, the target frame shaft being one of the frame shafts of different holders; When calibrating the target frame shaft, the motors of all other frame shafts are caused to enter a position lock or maintain a constant posture; Before causing the target frame shaft to enter a free state, the target frame shaft is driven to a preset calibration preparation posture; After completing the calibration process of the target frame shaft, the target frame shaft is locked at the calibrated zero position, and the next frame shaft is released and calibration is started; After all frame shafts are independently calibrated, the zero position calibration values of the frame shafts are integrated, and the overall coordinate transformation parameters of the holder system are uniformly updated.
[0014] In the second aspect, the embodiments of the present application further propose a calibration device of a holder of an unmanned aerial vehicle, comprising: A state control module is configured to control the frame shaft of the holder to enter a free state; A shock application module is configured to apply an initial angular displacement to the frame shaft in the free state, so that the frame shaft performs free decay oscillation; a data acquisition module configured to acquire a decay response data sequence of angular displacement of the frame shaft over time in a free decay oscillation; a data fitting module configured to fit the decay response data sequence to a preset system model, the system model comprising dynamic parameters for characterizing moment of inertia and damping ratio of the frame shaft, and a constant bias parameter for characterizing zero position bias of the angle sensor; a data solving module configured to solve a value of the constant bias parameter as a zero position calibration value according to the fitting result, and drive a motor of the gimbal according to the zero position calibration value to rotate the frame shaft and lock the frame shaft at a calibrated zero position attitude.
[0015] In a third aspect, the embodiments of the present application further provide an electronic device, comprising 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, and the processor, when executing the one or more computer programs, causes the electronic device to implement the calibration method of the gimbal of the unmanned aerial vehicle according to the first aspect.
[0016] The embodiments of the present application can achieve the following technical effects: The embodiments of the present application stimulate and analyze the dynamic response of the gimbal frame shaft itself to identify the zero position bias, and the whole process can be automatically executed by the gimbal controller without the need of external devices such as high-precision turntable and level, thereby greatly simplifying the calibration process and reducing the requirements for operating environment and personnel skills.
[0017] Meanwhile, the embodiments of the present application solve the constant bias of the sensor by nonlinear fitting of the actually collected decay oscillation data and the dynamic model containing the zero position bias, thereby avoiding the errors caused by manual observation or dependence on unstable reference (such as gravity field), and the result is more accurate and reliable.
[0018] In addition, the embodiments of the present application are based on the universal second-order oscillation system model, which is not only applicable to the pitch axis and roll axis of the gimbal, but also effectively applicable to the heading axis which cannot be calibrated by using the gravity vector, thereby realizing unified calibration of all degrees of freedom of the gimbal and effectively avoiding the situation of collision between the gimbal and the ground. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0020] Figure 1A flowchart of a calibration method of a gimbal of a UAV is provided in the embodiments of the present application. Figure 2 A frame diagram of a calibration device of a gimbal of a UAV is provided in the embodiments of the present application. Figure 3 A structure diagram of an electronic device is provided in the embodiments of the present application. DETAILED DESCRIPTION
[0021] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0022] It should be noted that the various features in the embodiments of the present application can be combined with each other without conflict, and all fall within the scope of protection of the present application. In addition, although the functional modules are divided in the system diagram, and the 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. Furthermore, the "first", "second", "third" and the like used in the present application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same function and effect.
[0023] Figure 1 A flowchart of a calibration method of a gimbal of a UAV is provided in the embodiments of the present application. As shown in Figure 1 The above method includes steps S10-S50: Step S10, control the frame shaft of the gimbal to enter a free state; Step S20, apply an initial angular displacement to the frame shaft in the free state to make the frame shaft perform free damped oscillation; Step S30, obtain a damped response data sequence of the angular displacement of the frame shaft changing with time in the free damped oscillation; Step S40, fit the damped response data sequence with a preset system model, the system model including dynamic parameters for characterizing the moment of inertia and damping ratio of the frame shaft, and a constant bias parameter for characterizing the zero position deviation of the angle sensor; Step S50, according to the fitting result, solve the numerical value of the constant bias parameter as a zero position calibration value, and drive the motor of the gimbal according to the zero position calibration value, so that the frame shaft rotates and locks in the calibrated zero position attitude.
[0024] 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.
[0025] 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: 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. It can read data from angle sensors (such as encoders or IMUs) in real time at a certain sampling frequency (e.g., 200Hz - 1000Hz).
[0026] 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.
[0027] 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.
[0028] 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.
[0029] 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.
[0030] 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.
[0031] 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.
[0032] Specifically, each pair of (timestamp, angle value) data is stored in an array or list in memory. For example: Data_Sequence=[(t_0,θ_0),(t_1,θ_1),(t_2,θ_2),...,(t_n,θ_n)].
[0033] 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.
[0034] Based on this, this embodiment performs data fitting and parameter calculation.
[0035] 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: ; 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; 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: ; Let be the damped oscillation frequency, satisfying: , 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.
[0036] 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.
[0037] 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: .
[0038] 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.
[0039] 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.
[0040] 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.
[0041] Based on this, the PTZ controller can store the calculated zero-position calibration value C in non-volatile memory (such as Flash or EEPROM) so that it can be used directly the next time it is powered on.
[0042] 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.
[0043] 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: True angle = Sensor reading - C; Alternatively, PID error = (target angle + C) - sensor reading.
[0044] In a preferred embodiment, the frame axis of the control gimbal enters a free state, including: Send a control command to the motor driving the frame axis to switch the motor from closed-loop servo control mode to open-loop mode; In the open-loop mode of the motor, the drive 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.
[0045] 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.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] In a preferred embodiment, applying an initial angular displacement to the frame axis in its 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.
[0050] 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.
[0051] 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.
[0052] 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: 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.
[0053] 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.
[0054] 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.
[0055] 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. 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.
[0056] 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.
[0057] As a preferred embodiment, fitting the attenuation response data sequence to 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.
[0058] 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.
[0059] In this embodiment, the form of constructing the fitting function is as follows: ; 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.
[0060] The estimated values in the above embodiments and As the initial value for nonlinear optimization iteration.
[0061] 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.
[0062] As a preferred embodiment, the above embodiments further include: 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.
[0063] 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: ; Received This is the angle value with zero-position deviation corrected, used for all subsequent servo control, attitude calculation and data output.
[0064] As a preferred embodiment, the method of this embodiment 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.
[0065] 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.
[0066] 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|.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] 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: 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.
[0071] Specifically, assume the gimbal has three frame axes: pitch, roll, and yaw. When the pitch axis needs to be calibrated: 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.
[0072] 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; 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.
[0073] 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.
[0074] Please refer to Figure 2 This application also proposes a calibration device for a drone gimbal, comprising: The state control module 210 is used to control the frame axis of the gimbal to enter the free state; 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; 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; 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. 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.
[0075] 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.
[0076] Furthermore, see Figure 3 , Figure 3This 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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 method for calibrating a gimbal of a UAV, characterized in that, The method comprises: controlling a frame shaft of a gimbal to enter a free state; applying an initial angular displacement to the frame shaft in the free state to make the frame shaft perform free damped oscillation; acquiring a damped response data sequence of the angular displacement of the frame shaft changing with time in the free damped oscillation; fitting the damped response data sequence to a preset system model, the system model comprising dynamic parameters for characterizing the moment of inertia and damping ratio of the frame shaft, and a constant bias parameter for characterizing the zero position deviation of an angle sensor; according to the fitting result, solving the value of the constant bias parameter as a zero position calibration value, and driving a motor of the gimbal according to the zero position calibration value to make the frame shaft rotate and lock at a calibrated zero position attitude.
2. The calibration method of the unmanned aerial vehicle gimbal according to claim 1, characterized in that, The method comprises: sending a control instruction to the motor driving the frame shaft to switch the motor from a closed-loop servo control mode to an open-loop mode; in the open-loop mode of the motor, setting a drive bridge arm of the motor to a high resistance state; monitoring the armature current or back electromotive force signal of the motor, and determining that the frame shaft has entered the free state after confirming that the armature current or back electromotive force signal continuously falls below a preset small threshold value.
3. The calibration method of the UAV gimbal according to claim 1, wherein, The method comprises: applying a short-time pulse voltage signal to the motor driving the frame shaft, the short-time pulse voltage signal making the motor generate an electromagnetic torque when applied, the electromagnetic torque providing an initial angular velocity for the frame shaft, and the electromagnetic torque disappearing after the short-time pulse voltage signal ends, so that the frame shaft starts the free damped oscillation at the initial angular velocity.
4. The calibration method of the UAV gimbal according to claim 1, characterized in that, The method comprises: sampling data through an angle sensor on the frame shaft while applying the initial angular displacement; recording the original readings of the angle sensor to form an initial data sequence; performing filter processing on the initial data sequence based on a preset filter, the cutoff frequency of the filter being higher than the inherent oscillation frequency of the frame shaft; stopping sampling and storing the filtered data as the damped response data sequence when the oscillation amplitude of the frame shaft decays below a preset amplitude threshold value or the sampling time length of the angle sensor reaches a preset maximum sampling time length.
5. The calibration method of the UAV gimbal according to claim 1, wherein, The method comprises: determining the damping ratio and damped natural frequency based on the damped response data sequence; constructing a fitting function with time as a variable based on the damping ratio and damped natural frequency as an iteration starting point; adopting a nonlinear least squares optimization algorithm to iteratively optimize and calculate the to-be-determined parameters, so that the overall deviation between the output of the fitting function and the damped response data sequence is minimized, and the value of the constant bias parameter output by the fitting function after the iteration optimization stops is the solved zero position calibration value.
6. The calibration method of the unmanned aerial vehicle gimbal according to claim 1, characterized in that, The method further comprises: storing the solved zero position calibration value in a gimbal controller, and calibrating the gimbal controller by reading the original data of the angle sensor and subtracting the zero position calibration value.
7. The calibration method of the unmanned aerial vehicle gimbal according to claim 1, characterized in that, The method further comprises: Compensating the original attenuation response data sequence with the zero position calibration value obtained by the first fitting to obtain a new data sequence; Performing the fitting process again based on the new data sequence to obtain a second zero position calibration value; Calculating the difference between the two zero position calibration values, and if the difference is less than a preset convergence threshold, taking the second zero position calibration value as the final result; If the difference is greater than or equal to the convergence threshold, repeating the data compensation and the second fitting until the difference meets the convergence condition or a preset maximum iteration number is reached.
8. The calibration method of the unmanned aerial vehicle gimbal according to claim 1, characterized in that, The driving of the motor of the gimbal according to the zero position calibration value to rotate the frame shaft and lock it in the calibrated zero position attitude comprises: Determining a target frame shaft, which is one of the frame shafts of different gimbals; When calibrating the target frame shaft, making the motors of all other frame shafts enter the position locking or keep the constant attitude; Before making the target frame shaft enter the free state, driving it to a preset calibration preparation attitude; After completing the calibration process of the target frame shaft, locking it in the calibrated zero position, releasing and starting to calibrate the next frame shaft; After all the frame shafts are independently calibrated, integrating the zero position calibration values of the frame shafts to uniformly update the overall coordinate transformation parameters of the gimbal system.
9. A calibration device of a UAV gimbal, characterized in that, Comprise: A state control module for controlling the frame shaft of the gimbal to enter a free state; A shock application module for applying an initial angular displacement to the frame shaft in the free state to make the frame shaft perform free attenuation oscillation; A data acquisition module for acquiring an attenuation response data sequence of the angular displacement of the frame shaft changing with time in the free attenuation oscillation; A data fitting module for fitting the attenuation response data sequence with a preset system model, the system model comprising dynamic parameters for characterizing the moment of inertia and damping ratio of the frame shaft, and a constant bias parameter for characterizing the zero position deviation of the angle sensor; A data solving module for solving the value of the constant bias parameter as a zero position calibration value according to the fitting result, and driving the motor of the gimbal according to the zero position calibration value to rotate the frame shaft and lock it in the calibrated zero position attitude.
10. An electronic device, comprising: An electronic device comprising a memory and a processor, the memory being connected to the processor, the processor being used to execute one or more computer programs stored in the memory, and the processor, when executing the one or more computer programs, causing the electronic device to implement the calibration method of the unmanned aerial vehicle gimbal according to any one of claims 1-8.
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
Holder position calibration detection method, device and system
CN112135124A
Detection device, correction device, processing device, and article manufacturing method
US20230133411A1
Detection method and apparatus for gimbal, movable platform and storage medium
WO2022133732A1