PTZ control method, device, control equipment and storage medium
By calculating the disturbance parameters of the gimbal and compensating the attitude control parameters, the problem of reducing the control accuracy of the gimbal when the system characteristic parameters are changed is solved, and the control accuracy and effect of the gimbal is improved.
Patent Information
- Application Number
- CN202111464763.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-12-03
AI Technical Summary
During the operation, the gimbal is affected by changes in system characteristics and parameters, resulting in a decrease in control accuracy. Especially when the camera lens length changes, the angle control of the gimbal is prone to overshoot, affecting the control effect.
By calculating the disturbance parameters of the gimbal in the current working state, compensating the attitude control parameters based on the historical attitude parameters and command control parameters, the attitude control parameters of the gimbal are generated to reduce the impact of changes in the working state on control and improve control accuracy.
It effectively reduces the impact of changes in the working state of the gimbal on the control accuracy, improves the control accuracy and control effect of the gimbal, and avoids the overshoot of angle control.
Smart Images

Figure CN114167902B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of pan / tilt control, and in particular to a pan / tilt control method, device, control equipment and storage medium. Background Art
[0002] In the control scenario of the gimbal, a cascade control mode is generally adopted, with angle control as the outer control loop and angular velocity control as the inner control loop. By setting the angle or angular velocity of the gimbal and taking the measured value of the angle or angular velocity as feedback, a closed-loop control system is constructed.
[0003] When the gimbal is working, it can use the mounted camera to shoot some target objects, thereby completing tasks such as target tracking and map surveying.
[0004] However, when the camera is shooting the target object, the system characteristic parameters of the entire gimbal system may change due to the change of the gimbal working state, which reduces the gimbal control accuracy. Summary of the invention
[0005] The purpose of the present application is to provide a pan-tilt control method, device, control equipment and storage medium, which can improve the control accuracy of the pan-tilt.
[0006] In order to achieve the above purpose, the technical solution adopted in this application is as follows:
[0007] In a first aspect, the present application provides a pan / tilt control method, the method comprising:
[0008] Calculating a current disturbance parameter of the gimbal in a current working state relative to a nominal working state according to the historical attitude parameters of the gimbal;
[0009] According to the instruction control parameters, the current attitude parameters of the gimbal and the current disturbance parameters, attitude control parameters of the gimbal are generated, so as to perform attitude control on the gimbal based on the attitude control parameters.
[0010] In a second aspect, the present application provides a pan / tilt control device, the device comprising:
[0011] A processing module, used for calculating the current disturbance parameter of the gimbal in the current working state relative to the nominal working state according to the historical attitude parameter of the gimbal;
[0012] The processing module is also used to generate the attitude control parameters of the gimbal according to the instruction control parameters, the current attitude parameters of the gimbal and the current disturbance parameters;
[0013] A control module is used to perform posture control on the gimbal based on the posture control parameters.
[0014] In a third aspect, the present application provides a control device, which includes a memory for storing one or more programs; a processor; when the one or more programs are executed by the processor, the above-mentioned gimbal control method is implemented.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned gimbal control method when executed by a processor.
[0016] The present application provides a gimbal control method, device, control equipment and storage medium. In the process of performing posture control on the gimbal based on command control parameters, the current disturbance parameters of the gimbal in the current working state relative to the nominal working state are calculated by using the historical posture parameters of the gimbal, and the command control parameters and the current posture parameters of the gimbal are compensated by using the calculated current disturbance parameters to generate the posture control parameters of the gimbal, so as to perform posture control on the gimbal based on the posture control parameters. In this way, the influence of changes in the working state of the gimbal on the control of the gimbal can be reduced, thereby improving the control accuracy of the gimbal.
[0017] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A comparison chart showing the control effect when the lens length changes.
[0020] Figure 2 A schematic structural block diagram of the control device provided in the present application is shown.
[0021] Figure 3 An exemplary flow chart of the pan / tilt control method provided in the present application is shown.
[0022] Figure 4 An example diagram showing the relationship between the lens coordinate system and the motor coordinate system.
[0023] Figure 5 Another control effect comparison chart showing when the lens length changes.
[0024] Figure 6An exemplary structural block diagram of the pan-tilt control device provided in the present application is shown.
[0025] In the figure: 100 - control device; 101 - memory; 102 - processor; 103 - communication interface; 300 - pan / tilt control device; 301 - processing module; 302 - control module. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below in conjunction with the drawings in some embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Generally, the components of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0027] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents some selected embodiments of the present application. All other embodiments obtained by ordinary technicians in the field without creative work based on some embodiments in the present application are within the scope of protection of the present application.
[0028] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0029] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0030] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0031] In the above-mentioned gimbal usage scenario, for example, the target object can be photographed through the camera lens mounted on the gimbal, and the camera can be zoomed based on different shooting requirements.
[0032] Among them, in some possible scenarios, affected by the change of the working state of the gimbal, some system characteristic parameters of the gimbal system may change, resulting in reduced gimbal control accuracy.
[0033] For example, when the gimbal is mounted on a drone and is flying, the size or direction of the wind resistance it experiences will generally change, causing the unbalanced torque of the gimbal to change. This results in a difference between the amount of posture change of the gimbal controlled by the user through devices such as a remote control and the actual amount of posture change of the gimbal, thereby reducing the control accuracy of the gimbal.
[0034] For another example, during a zoom operation on a camera, since the length of the camera lens generally changes, system characteristic parameters such as the center of gravity and moment of inertia of the entire gimbal system including the camera may change.
[0035] For example, the calculation is described using the length of a camera lens at a certain zoom factor. Under this camera lens length, combined with the electrical parameters of the motor of the gimbal, the electrical time constant of each rotation axis can be expressed as:
[0036]
[0037] Among them, T m represents the electrical time constant, J represents the sum of the moments of inertia of the motor and the load, R represents the motor armature resistance, Ke represents the motor back electromotive force constant, and Kt represents the motor torque constant.
[0038] In the above calculation formula, R, Ke, and Kt are all electrical parameters of the motor, which can be directly read; and J represents the sum of the rotational inertia of the motor and the load, and its value is related to the length of the camera lens. When the length of the camera lens changes, the value of J will also change.
[0039] Moreover, when the inductance of the DC motor is not considered, the single-axis system rotation motion equation can be expressed as follows:
[0040]
[0041] Among them, θ and ω represent the angle and angular velocity of the gimbal rotation, respectively. d Indicates the motor speed gain coefficient, T L It represents the sum of the friction torque on a single shaft and the unbalanced torque deviating from the equilibrium point, and u represents the armature current of the motor.
[0042] It can be seen from the above formula that when the length of the camera lens changes, the value of the sum of the moments of inertia J of the motor and the load will also change, causing the angle and angular velocity of the gimbal to change, which in turn leads to a decrease in the control accuracy of the gimbal, for example, the gimbal's rotation angle is lower than the received command angle.
[0043] For example, combining Figure 1 As shown, Figure 1 Change curve 1 can indicate the angle change curve of the gimbal when the camera lens is the shortest, and change curve 2 can indicate the angle change curve of the gimbal when the camera lens is the longest. After a simple comparison, it can be found that when the camera lens becomes longer, the angle control of the gimbal will have a large overshoot and the control effect will be reduced.
[0044] Therefore, based on the above-mentioned defects, some possible implementation methods provided by the present application are: in the process of performing attitude control on the gimbal based on command control parameters, by utilizing the historical attitude parameters of the gimbal, the current disturbance parameters of the gimbal in the current working state relative to the nominal working state are calculated, and then the command control parameters and the current attitude parameters of the gimbal are compensated by utilizing the calculated current disturbance parameters to generate the attitude control parameters of the gimbal, thereby improving the control accuracy of the gimbal.
[0045] See also Figure 2 , Figure 2 A schematic structural block diagram of a control device 100 provided in the present application is shown. The control device 100 may be a control unit of a gimbal, a control unit of a drone, or other device electrically connected to the gimbal for controlling the gimbal.
[0046] In some embodiments, the control device 100 may include a memory 101, a processor 102, and a communication interface 103, wherein the memory 101, the processor 102, and the communication interface 103 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.
[0047] The memory 101 can be used to store software programs and modules, such as program instructions / modules corresponding to the pan-tilt control device provided in this application, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101, thereby executing the steps of the pan-tilt control method provided in this application. The communication interface 103 can be used to communicate signaling or data with other node devices.
[0048] Among them, the memory 101 can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable programmable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0049] The processor 102 may be an integrated circuit chip with signal processing capability. The processor 102 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0050] Understandably, Figure 2 The structure shown is for illustration only. The control device 100 may also include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations are shown. Figure 2 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0051] Below Figure 2 The control device 100 shown is used as an illustrative execution entity to illustrate the pan-tilt control method provided in the present application.
[0052] See also Figure 3 , Figure 3 An exemplary flow chart of the pan-tilt control method provided by the present application is shown. In some embodiments, the pan-tilt control method may include the following steps:
[0053] Step 201, based on the historical attitude parameters of the gimbal, calculate the current disturbance parameters of the gimbal in the current working state relative to the nominal working state.
[0054] Step 203 , generating attitude control parameters of the gimbal according to the command control parameters, the current attitude parameters of the gimbal, and the current disturbance parameters, so as to perform attitude control on the gimbal based on the attitude control parameters.
[0055] In some embodiments, taking the above formula (1) as an example, the control device can record a nominal working state, which can be the working state of the gimbal when the camera lens of the gimbal is in a preset state, or the working state when the gimbal is not affected by wind resistance; illustratively, taking the camera lens in the preset state as an example, assuming that the variation range of the camera lens is 10 to 40 mm, the working state of the gimbal when the length of the camera lens is 20 mm can be determined as the nominal working state of the gimbal.
[0056] Of course, it can be understood that the above is only an example to illustrate the nominal working state of the gimbal. In some other possible embodiments of the present application, the nominal working state of the gimbal may also be the working state of the gimbal when the camera lens is in other states, and the present application does not limit this.
[0057] Based on the nominal working state, when executing the gimbal control method provided in this application, the control device can first calculate the current disturbance parameters of the gimbal in the current working state relative to the nominal working state according to the historical posture parameters of the gimbal.
[0058] For example, the control device can adopt an iterative calculation method. Assuming that the current moment is the tth moment, and t is an integer greater than 1, the control device can determine the posture parameters of the gimbal collected at the t-1th moment as the historical posture parameters of the tth moment; determine the posture parameters of the gimbal collected at the tth moment as the historical posture parameters of the tth moment; determine the posture parameters of the gimbal collected at the tth moment as the historical posture parameters of the t+1th moment; determine the posture parameters of the gimbal collected at the t+1th moment as the historical posture parameters of the t+2th moment; and so on.
[0059] In some embodiments, the above-mentioned current disturbance parameters calculated by the control device can be used as compensation amounts for gimbal control, so that when the control device receives a posture control instruction sent by a device such as a remote control, it can use the received control instruction as an instruction control parameter for controlling the posture of the gimbal, and combine the current posture parameters of the gimbal and the current disturbance parameters calculated by step 201 to generate the posture control parameters of the gimbal, so that the control device can perform posture control on the gimbal based on the posture control parameters; that is: in the process of performing posture control on the gimbal based on the instruction control parameters, the control device can use the calculated current disturbance parameters for compensation, thereby reducing the impact of changes in the length of the gimbal camera lens on the gimbal control, and thereby improving the control accuracy of the gimbal.
[0060] In some embodiments, when the control device executes step 201 to calculate the current disturbance parameters of the gimbal, the control device can use the nominal working state of the gimbal as a reference object, determine the attitude parameters of the gimbal in the nominal working state as nominal attitude parameters, and calculate the attitude deviation of the historical attitude parameters of the gimbal relative to the nominal attitude parameters based on differential calculation.
[0061] For example, the control device can pre-configure an observer, and the observer corresponds to a state parameter, which can indicate the state parameter of the gimbal under the nominal working state. For example, taking the above-mentioned camera lens length as an example, the length of the camera lens in the observer can be the above-mentioned 20 mm, that is, the camera lens of the gimbal is in a preset state.
[0062] Based on this, when calculating the attitude deviation of the historical attitude parameters of the gimbal relative to the nominal attitude parameters, the control device can first calculate the estimated attitude parameters of the gimbal in the nominal working state based on the pre-configured observer.
[0063] For example, taking the angular velocity and angle of the gimbal as the calculation dimensions of the attitude parameters, the calculation formula of the estimated attitude parameters of the gimbal in the nominal working state can be expressed as follows:
[0064]
[0065] In the formula, represents the estimated angle at the tth moment; represents the estimated angle at the t-1th moment; h represents the time interval from the t-1th moment to the tth moment; represents the estimated angular velocity at time t; represents the estimated angular velocity at time t-1; T m Represents the electrical time constant; K d represents the motor speed gain coefficient, u(t-1) represents the attitude control parameter at the t-1th moment; represents the disturbance parameter estimated at time t-1; L represents the preset observer parameter; It represents the posture deviation at the t-1th moment, and its calculation formula can be expressed as follows:
[0066]
[0067] In the formula, and
[0068] θ m (t-1) represents the measured angle of the gimbal at the t-1th moment, ω m (t-1) represents the measured angular velocity of the gimbal at the t-1th moment.
[0069] Then, based on the estimated attitude parameters (including the estimated angular velocity) at the tth moment calculated by the above estimation With estimated angle ), the control device can compare it with the historical posture parameters of the gimbal at the tth moment (including the measured angular velocity ω of the gimbal at the tth moment m (t) and the measured angle θ m The difference between the historical attitude parameters of the gimbal and the estimated attitude parameters is determined as the attitude deviation of the historical attitude parameters of the gimbal relative to the nominal attitude parameters. That is, according to the iterative calculation method, the state deviation The calculation formula can be expressed as follows:
[0070]
[0071] In the formula, and θ m (t) represents the measured angle of the PTZ at the tth moment, ω m (t) represents the measured angular velocity of the gimbal at the tth moment.
[0072] Then, based on the above calculated attitude deviation, the control device can calculate the current disturbance parameter of the gimbal in the current working state relative to the nominal working state according to the attitude deviation and the saved historical disturbance parameter.
[0073] For example, based on the iterative calculation method, the calculation formula of the current disturbance parameter can be expressed as follows:
[0074]
[0075] In the formula, represents the disturbance parameter estimated at time t; represents the disturbance parameter estimated at the saved time t-1; represents the posture deviation at the t-1th moment; f represents the preset nonlinear function, which can be expressed as follows:
[0076]
[0077] Wherein, ε represents the set observation error threshold. Among them, in some possible scenarios, when the posture deviation calculated by the control device is small, compared with the linear function method, the above method provided by the present application can improve the convergence speed of the disturbance parameter estimation calculation, thereby ensuring that the disturbance parameters can be calculated more accurately in a shorter time.
[0078] It should be noted that the above implementation method provided in the present application is only an example. When calculating the disturbance parameters estimated at the tth moment, the disturbance parameters estimated at the t-1th moment are used for iterative calculation by differential calculation. In some other possible implementation methods of the present application, the control device can also adopt methods such as differentiation, using a pre-configured differential formula, with the calculated posture deviation as input, without combining the disturbance parameters estimated at the previous moment, so as to obtain the current disturbance parameters.
[0079] In addition, in some possible scenarios, when executing step 203, the control device can combine a pre-set controller to process the command control parameters, the current attitude parameters of the gimbal, and the current disturbance parameters calculated above, thereby generating the attitude control parameters of the gimbal.
[0080] For example, in some possible implementations, when executing step 203, the control device may first calculate the attitude control error of the gimbal according to the instruction control parameters and the current attitude parameters of the gimbal.
[0081] Among them, taking angle and angular velocity control as an example, the calculation formula of the gimbal's attitude control error can be expressed as follows:
[0082]
[0083] In the formula, e θ (t) represents the angle error in the attitude control error; e ω (t) represents the angular velocity error in the attitude control error; θ r (t) represents the angle parameter in the command control parameter at the tth moment; ω r (t) represents the angular velocity parameter in the command control parameter at the tth moment; θ m (t) represents the angle parameter in the gimbal’s attitude parameter at the tth moment; ω m (t) represents the angular velocity parameter in the gimbal's attitude parameters at the t-th moment.
[0084] Next, based on the calculated attitude control error, the control device can input the attitude control error and the above-calculated current disturbance parameter into the pre-set controller, and obtain the result output by the controller, thereby using the result output by the controller as the attitude control parameter of the gimbal.
[0085] For example, in some possible implementations, the calculation formula of the attitude control parameter of the gimbal at the tth moment can be expressed as follows:
[0086]
[0087] Where u(t) represents the attitude control parameter at the tth moment; s(t) = ceθ (t)+e ω (t), c, k and η are all pre-set controller parameters; α r (t) represents the acceleration in the command control parameter at the tth moment; sgn(s) is the sign function.
[0088] In this way, after the attitude control parameter u(t) of the gimbal at the tth moment is calculated according to the above formula, for example, the control device can use it as the control input of the motor to perform attitude control on the gimbal based on the attitude control parameter.
[0089] It should be noted that in some possible scenarios, the rotation axes of the gimbal generally include a heading axis, a pitch axis, and a roll axis. When obtaining the current attitude parameters of the gimbal, the angle sensors set on each rotation axis of the gimbal can be used to measure the attitude parameters of the gimbal in, for example, the heading direction, the pitch direction, and the roll direction. In some embodiments, the acceleration feedback from the IMU (Inertial Measurement Unit) on the lens can also be used to determine the angle of the gimbal.
[0090] However, due to the change in the rotation angle of each axis of the gimbal, the IMU on the lens is not completely parallel to the motor axis, resulting in the attitude parameters measured by the IMU not corresponding to the attitude parameters of the motor axis rotation. Therefore, it is necessary to map the attitude parameters measured by each axis of the IMU to each motor axis.
[0091] Among them, combined Figure 4 As shown in the figure, taking angular velocity mapping as an example, when the camera lens of the gimbal is at zero position, the lens coordinate system coincides with the motor coordinate system. When the camera lens rotates around the heading axis, the camera lens part of the gimbal rotates together with the roll and pitch motors. At this time, the motor coordinate system of the gimbal still coincides with the lens coordinate system, so turning the heading will not change the mapping relationship between the camera lens and the motor coordinate system.
[0092] When the camera lens of the gimbal rotates around the roll axis The frame where the pitch motor is located rotates with the camera lens. At this time, the pitch motor axis of the gimbal is still parallel to the pitch axis of the lens, but there is an angle between the pan axis C” of the lens and the pan axis Z of the motor, and they have the following mapping relationship:
[0093]
[0094] When the camera lens of the gimbal rotates around the pitch axis by an angle γ, the rotation of the lens causes an angle between the gimbal's roll and pan motor axes and the camera lens, and has the following mapping relationship:
[0095]
[0096] When the camera lens of the gimbal rotates in the pitch direction, roll direction and heading direction respectively, ψ, then the relationship between the camera lens coordinate system and the motor coordinate system is as follows Figure 4 shown.
[0097] Therefore, based on the rotation transformation matrix corresponding to a single axis, the coordinate transformation matrix from the lens coordinate system to the motor coordinate system can be expressed as:
[0098]
[0099] Therefore, based on the above-mentioned coordinate transformation matrix expression formula, before calculating the posture control error of the gimbal according to the instruction control parameters and the current posture parameters of the gimbal, the control device can also substitute the posture parameters of the gimbal's camera lens at the current moment into the above-mentioned coordinate transformation matrix expression, so as to obtain the rotation transformation matrix corresponding to the camera lens at the current moment, and use the rotation transformation matrix corresponding to the camera lens at the current moment to perform coordinate transformation on the current posture parameters of the gimbal, that is, convert the coordinate parameters in the lens coordinate system into the gimbal coordinate system, so as to decouple the current posture parameters of the gimbal, and use the current posture parameters after the coordinate transformation to perform the operation of calculating the operation control error of the gimbal.
[0100] For example, taking the above angular velocity mapping as an example, based on the above coordinate transformation matrix, the calculation formula for decoupling the rotation angular velocity measured by the camera lens IMU to obtain the angular velocity of each motor shaft can be expressed as follows:
[0101] ω=Ωω′……(13)
[0102] Among them, ω′ is the angular velocity measured by the lens IMU, and ω is the angular velocity of each motor axis after coordinate conversion.
[0103] It should be pointed out that, combined with the above formula (9), when calculating the attitude control parameters of the gimbal at time t, the calculation formula used includes some system state parameters of the controller, such as the electrical time constant T m , Motor speed gain coefficient K d and the pre-set controller parameters such as c, k, η, etc.; and combined with formula (1), it can be seen that the electrical time constant T m It is a parameter related to the sum of the moments of inertia of the motor and the load, that is, the electrical time constant T m May be affected by changes in camera lens length.
[0104] In some embodiments, when the control device calculates the posture control parameter u(t) of the motor based on formula (9), the set electrical time constant T mHowever, in order to improve the calculation accuracy of the attitude control parameter u(t), in some possible scenarios, the control device can also update the system state parameters of the controller according to the moment of inertia of the rotation axis of the gimbal at the current moment, such as the electrical time constant T m , so that the control device can calculate the attitude control parameter u(t) using the system state parameters updated by the controller, so as to improve the calculation accuracy of the attitude control parameter u(t), thereby improving the control accuracy of the gimbal.
[0105] In addition, in combination with the above-mentioned implementation methods provided in the present application, it can be known that the gimbal control method provided in the present application needs to use the nominal working state of the gimbal as a reference to calculate the current disturbance parameters of the gimbal in the current working state relative to the nominal working state, and then use the current disturbance parameters to compensate for the command control parameters to improve the control accuracy of the gimbal.
[0106] The above-mentioned nominal working state may refer to the working state of the gimbal when the camera lens of the gimbal is in a preset state. For example, in the above-mentioned example, the nominal working state may be the working state of the gimbal when the length of the camera lens is 20 mm. When calculating, the system state parameters of the controller when the gimbal is in the nominal working state need to be used in the calculation, such as the electrical time constant T when the gimbal is powered on. m .
[0107] Therefore, in some possible implementations, before the control device executes step 201, when the gimbal is powered on, the control device may adjust the gimbal to a nominal working state, and calculate the system state parameters of the controller according to the moment of inertia of the gimbal in the nominal working state, thereby applying the calculated system state parameters to the above-mentioned calculation process; for example, when the gimbal is powered on, the control device may calculate the electrical time constant T by using, for example, formula (1): m , and the calculated electrical time constant T m Applied in the calculation process of formula (2), formula (3) and formula (9).
[0108] Among them, exemplarily, taking the length of the camera lens of the gimbal as a consideration dimension of the nominal working state, when the control device adjusts the gimbal to the nominal working state, the camera lens of the gimbal can be adjusted to a preset state, such as adjusting the length of the camera lens to 20mm in the above example, so that the gimbal is in the nominal working state.
[0109] Of course, it can be understood that the above method is only an example, and the system status parameters of the controller when the gimbal is powered on are calculated by automatic calculation; in some other possible implementations of the present application, the control device can also obtain the initial system status parameters of the controller by receiving input from other devices or user settings.
[0110] The following is an example of the gimbal control method provided in this application based on some gimbal control scenarios.
[0111] The control device can run a sliding film controller and a disturbance observer. When the motors and loads of each axis of the gimbal are working, the working current u of the gimbal can be collected by the set current sensor, angular velocity sensor and angle sensor. m , angular velocity ω after decoupling m and the angle θ m ; And, when the PTZ is powered on, the control device can calculate the electrical time constant T by, for example, the above formula (1). m And other system status parameters.
[0112] In some possible scenarios, the remote controller can send a command acceleration α to the gimbal. r , command angular velocity ω r 、Command angle θ r And other command control parameters to control the gimbal to adjust the posture.
[0113] In the process of executing the gimbal control method provided by the present application, the disturbance observer running in the control device can perform iterative calculation based on the above-mentioned formula (3), formula (4) and other algorithms, using the saved attitude control parameter u(t-1) at the last calculation moment and attitude parameters such as angle and angular velocity to obtain the attitude deviation at the last calculation moment. Then, the disturbance observer can use the disturbance parameters saved at the previous calculation time based on the above-mentioned formula (5), formula (6) and other algorithms , the calculated posture deviation at the last calculation time , the angular velocity ω measured by the angular velocity sensor m and the angle θ measured by the angle sensor m , calculate the disturbance parameters at the current moment , and the disturbance parameter Output to the sliding film controller running in the control device; accordingly, the sliding film controller can use the calculated electrical time constant T based on the above-mentioned formula (8), formula (9) and other algorithms m , pre-configured motor speed gain factor K d , the disturbance parameters calculated at the current moment , received command acceleration α r , command angular velocity ω r 、Command angle θ r , the measured angular velocity ω m and the angle θ mAs input, the attitude control parameter u(t) of the gimbal at the current moment is calculated, and the attitude control parameter u(t) is output to the current controller, which then calculates the attitude control parameter u(t) and the working current u measured by the current sensor. m Control the gimbal to adjust its posture.
[0114] In order to illustrate the control effect of the pan / tilt control method provided by the present application, Figure 5 As shown, Figure 5 The change curve 1 in the figure can indicate the angle change curve of the gimbal when the camera lens is at its shortest, and the change curve 2 can indicate the angle change curve of the gimbal when the camera lens is at its longest. It can be seen that even if the camera lens changes within the range from the shortest to the longest, the angle control of the gimbal does not overshoot, thereby improving the control effect.
[0115] In addition, based on the same inventive concept as the above-mentioned pan / tilt control method provided in this application, please refer to Figure 6 , Figure 6 An exemplary structural block diagram of a pan-tilt control device 300 provided in the present application is shown. In some possible implementations, the pan-tilt control device 300 may include a processing module 301 and a control module 302 .
[0116] The processing module 301 is used to calculate the current disturbance parameter of the gimbal in the current working state relative to the nominal working state according to the historical attitude parameter of the gimbal;
[0117] The processing module 301 is also used to generate the attitude control parameters of the gimbal according to the instruction control parameters, the current attitude parameters of the gimbal and the current disturbance parameters;
[0118] The control module 302 is used to perform attitude control on the gimbal based on attitude control parameters.
[0119] Optionally, in some possible implementations, when the processing module 301 calculates the current disturbance parameter of the gimbal in the current working state relative to the nominal working state according to the historical attitude parameter of the gimbal, it is specifically used to:
[0120] Calculate the attitude deviation of the historical attitude parameters of the gimbal relative to the nominal attitude parameters; wherein the nominal attitude parameters are the attitude parameters of the gimbal in the nominal working state;
[0121] According to the attitude deviation and the saved historical disturbance parameters, the current disturbance parameters of the gimbal in the current working state relative to the nominal working state are calculated.
[0122] Optionally, in some possible implementations, when calculating the attitude deviation of the historical attitude parameter of the gimbal relative to the nominal attitude parameter, the processing module 301 is specifically configured to:
[0123] Calculate the estimated attitude parameters of the gimbal in the nominal working state based on the pre-configured observer;
[0124] The difference between the historical attitude parameters of the gimbal and the estimated attitude parameters is determined as the attitude deviation of the historical attitude parameters of the gimbal relative to the nominal attitude parameters.
[0125] Optionally, in some possible implementations, when the processing module 301 generates the attitude control parameters of the gimbal according to the instruction control parameters, the current attitude parameters of the gimbal, and the current disturbance parameters, it is specifically used to:
[0126] Calculate the attitude control error of the gimbal according to the command control parameters and the current attitude parameters of the gimbal;
[0127] The attitude control error and the current disturbance parameter are input into a pre-set controller, and the result output by the controller is used as the attitude control parameter of the gimbal; wherein the controller corresponds to the system state parameter.
[0128] Optionally, in some possible implementations, before calculating the attitude control error of the gimbal according to the instruction control parameter and the current attitude parameter of the gimbal, the processing module 301 is further configured to:
[0129] Using the rotation transformation matrix corresponding to the camera lens of the gimbal at the current moment, the current posture parameters of the gimbal are transformed into coordinates, so as to use the current posture parameters after the coordinate transformation to execute the command control parameters and the current posture parameters of the gimbal, and calculate the posture control error of the gimbal;
[0130] The rotation transformation matrix is used to convert the coordinates in the camera coordinate system and the coordinates in the gimbal coordinate system. The camera coordinate system is a coordinate system established based on the camera lens, and the gimbal coordinate system is a coordinate system established based on the gimbal.
[0131] Optionally, in some possible implementations, the processing module 301 is further configured to:
[0132] Update the system state parameters of the controller according to the moment of inertia of the rotation axis of the gimbal at the current moment.
[0133] Optionally, in some possible implementations, before calculating the current disturbance parameter of the gimbal in the current working state relative to the nominal working state according to the historical attitude parameter of the gimbal, the processing module 301 is further configured to:
[0134] When the gimbal is powered on, adjust the gimbal to the nominal working state;
[0135] According to the rotational inertia of the gimbal in the nominal working state, the system state parameters of the controller are calculated.
[0136] Optionally, in some possible implementations, when adjusting the gimbal to a nominal working state, the processing module 301 is specifically configured to:
[0137] Adjust the camera lens of the gimbal to the preset length so that the gimbal is in the nominal working state.
[0138] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to some embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment or a part of a code, and the module, program segment or a part of a code includes one or more executable instructions for implementing a specified logical function.
[0139] It should also be noted that in some alternative implementations, the functions marked in the blocks may also occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved.
[0140] It should also be noted that each box in the block diagram and / or flowchart, and combinations of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0141] In addition, in some embodiments of the present application, the functional modules may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0142] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in some embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks or optical disks.
[0143] The above description is only a partial embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0144] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A pan / tilt control method, characterized in that: The method comprises: Calculating the attitude deviation of the historical attitude parameters of the gimbal relative to the nominal attitude parameters; wherein the nominal attitude parameters are estimated attitude parameters of the gimbal in the nominal working state; Calculating the current disturbance parameter of the gimbal in the current working state relative to the nominal working state according to the attitude deviation and the saved historical disturbance parameter; According to the instruction control parameters, the current attitude parameters of the gimbal and the current disturbance parameters, attitude control parameters of the gimbal are generated, so as to perform attitude control on the gimbal based on the attitude control parameters.
2. The method according to claim 1, characterized in that The step of calculating the attitude deviation of the historical attitude parameter of the gimbal relative to the nominal attitude parameter includes: Calculating estimated attitude parameters of the gimbal in a nominal working state based on a pre-configured observer; The difference between the historical attitude parameter of the gimbal and the estimated attitude parameter is determined as the attitude deviation of the historical attitude parameter of the gimbal relative to the nominal attitude parameter.
3. The method according to claim 1, characterized in that The step of generating the attitude control parameter of the gimbal according to the instruction control parameter, the current attitude parameter of the gimbal and the current disturbance parameter comprises: Calculating the attitude control error of the gimbal according to the command control parameter and the current attitude parameter of the gimbal; The attitude control error and the current disturbance parameter are input into a pre-set controller, and the result output by the controller is used as the attitude control parameter of the gimbal; wherein the controller corresponds to a system state parameter.
4. The method according to claim 3, characterized in that Before calculating the attitude control error of the gimbal according to the instruction control parameter and the current attitude parameter of the gimbal, the method further includes: Using the rotation transformation matrix corresponding to the camera lens of the gimbal at the current moment, the current posture parameters of the gimbal are subjected to coordinate transformation, so as to use the current posture parameters after the coordinate transformation to perform the step of calculating the posture control error of the gimbal according to the instruction control parameters and the current posture parameters of the gimbal; The rotation transformation matrix is used to convert coordinates in a camera coordinate system and coordinates in a gimbal coordinate system. The camera coordinate system is a coordinate system established based on the camera lens, and the gimbal coordinate system is a coordinate system established based on the gimbal.
5. The method according to claim 3, characterized in that The method further comprises: The system state parameters of the controller are updated according to the moment of inertia of the rotation axis of the pan / tilt platform at the current moment.
6. The method according to claim 3 or 5, characterized in that Before calculating the attitude deviation of the historical attitude parameter of the gimbal relative to the nominal attitude parameter, the method further includes: When the pan / tilt platform is powered on, adjusting the pan / tilt platform to the nominal working state; The system state parameters of the controller are calculated according to the rotational inertia of the pan / tilt platform in the nominal working state.
7. The method according to claim 6, characterized in that The step of adjusting the pan / tilt platform to the nominal working state includes: The camera lens of the gimbal is adjusted to a preset length so that the gimbal is in the nominal working state.
8. A pan / tilt control device, characterized in that: The device comprises: A processing module, used to calculate the attitude deviation of the historical attitude parameters of the gimbal relative to the nominal attitude parameters; wherein the nominal attitude parameters are estimated attitude parameters of the gimbal in the nominal working state; Calculating the current disturbance parameter of the gimbal in the current working state relative to the nominal working state according to the attitude deviation and the saved historical disturbance parameter; The processing module is also used to generate the attitude control parameters of the gimbal according to the instruction control parameters, the current attitude parameters of the gimbal and the current disturbance parameters; A control module is used to perform posture control on the gimbal based on the posture control parameters.
9. The device according to claim 8, characterized in that When calculating the attitude deviation of the historical attitude parameter of the gimbal relative to the nominal attitude parameter, the processing module is specifically used to: Calculating estimated attitude parameters of the gimbal in a nominal working state based on a pre-configured observer; The difference between the historical attitude parameter of the gimbal and the estimated attitude parameter is determined as the attitude deviation of the historical attitude parameter of the gimbal relative to the nominal attitude parameter.
10. The device according to claim 8, characterized in that When the processing module generates the attitude control parameter of the gimbal according to the instruction control parameter, the current attitude parameter of the gimbal and the current disturbance parameter, it is specifically used to: Calculating the attitude control error of the gimbal according to the command control parameter and the current attitude parameter of the gimbal; The attitude control error and the current disturbance parameter are input into a pre-set controller, and the result output by the controller is used as the attitude control parameter of the gimbal; wherein the controller corresponds to a system state parameter.
11. The device according to claim 10, characterized in that Before calculating the attitude control error of the gimbal according to the instruction control parameter and the current attitude parameter of the gimbal, the processing module is further used to: Using the rotation transformation matrix corresponding to the camera lens of the gimbal at the current moment, the current posture parameters of the gimbal are transformed into coordinates, so as to use the current posture parameters after the coordinate transformation to execute the control parameters according to the instruction and the current posture parameters of the gimbal, and calculate the posture control error of the gimbal; The rotation transformation matrix is used to convert coordinates in a camera coordinate system and coordinates in a gimbal coordinate system. The camera coordinate system is a coordinate system established based on the camera lens, and the gimbal coordinate system is a coordinate system established based on the gimbal.
12. The device according to claim 10, characterized in that The processing module is also used for: The system state parameters of the controller are updated according to the moment of inertia of the rotation axis of the pan / tilt platform at the current moment.
13. The device according to claim 10 or 12, characterized in that Before calculating the attitude deviation of the historical attitude parameter of the gimbal relative to the nominal attitude parameter, the processing module is further used to: When the pan / tilt platform is powered on, adjusting the pan / tilt platform to the nominal working state; The system state parameters of the controller are calculated according to the rotational inertia of the pan / tilt platform in the nominal working state.
14. The device according to claim 13, characterized in that When the processing module adjusts the pan / tilt head to the nominal working state, the processing module is specifically used to: The camera lens of the gimbal is adjusted to a preset length so that the gimbal is in the nominal working state.
15. A control device, characterized in that: include: A memory for storing one or more programs; processor; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Pan / tilt control method, handheld pan / tilt and computer readable storage medium
CN113170051A
Terminal equipment and control method and device thereof
CN113721450A