A pan / tilt control method, device, electronic equipment, pod and storage medium
By obtaining the attitude and motor status parameters of the gimbal and generating the motor control amount in combination with the disturbance parameters, the problem of reducing the control accuracy of the gimbal is solved and higher control accuracy and stability are achieved.
Patent Information
- Application Number
- CN202111456559.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2025-05-20
- Estimated Expiration
- 2041-12-01
AI Technical Summary
云台在工作过程中,由于目标对象的变化和系统特性参数的变化,导致云台控制精度降低。
By obtaining control command parameters, attitude parameters of the gimbal, motor status parameters and disturbance parameters, the motor control amount is generated to realize attitude control of the gimbal. This method considers dynamic disturbance parameters and system disturbance parameters to compensate for the attitude deviation of the gimbal.
The control accuracy of the gimbal is improved, and the disturbances caused by factors such as changes in the camera lens length are reduced, ensuring stable control of the gimbal is achieved under different working conditions.
Smart Images

Figure CN114167901B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of pan-tilt control, and more particularly, to a pan-tilt control method, device, electronic device, pod and storage medium. Background Art
[0002] In the control scenario of a pan-tilt, 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 a given angle or angular velocity for the pan-tilt and using the measured value of the angle or angular velocity as feedback, a closed-loop control system is constructed.
[0003] During the operation of the pan-tilt, a mounted camera can be used to photograph some target objects, thereby completing tasks such as target tracking and map surveying.
[0004] However, during the process of the camera photographing the target object, affected by the change of the working state, the system characteristic parameters of the entire pan-tilt system may change, resulting in a decrease in the control accuracy of the pan-tilt. Summary of the Invention
[0005] To provide a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not an extensive review nor is it intended to identify key / important elements or delineate the scope of protection of these embodiments, but rather serves as a preamble to the detailed description that follows.
[0006] The purpose of the present application is to provide a pan-tilt control method, device, control device and storage medium, which can improve the control accuracy of the pan-tilt.
[0007] To achieve the above purpose, the technical solution adopted by the present application is as follows:
[0008] In the first aspect, the present application provides a pan-tilt control method, the method comprising:
[0009] Obtaining control instruction parameters, attitude parameters of the pan-tilt, motor state parameter Um and disturbance parameters d; wherein, the disturbance parameters include dynamic disturbance parameters and system disturbance parameters;
[0010] Performing attitude control on the pan-tilt according to the control instruction parameters, attitude parameters of the pan-tilt, state parameters of the motor and disturbance parameters.
[0011] In the second aspect, the present application provides a pan-tilt control device, the control device comprising:
[0012] A processing module, configured to obtain control instruction parameters, attitude parameters of the pan-tilt, motor state parameters and disturbance parameters; wherein, the disturbance parameters include dynamic disturbance parameters and system disturbance parameters;
[0013] A control module, configured to perform attitude control on the pan-tilt according to the control instruction parameters, the attitude parameters of the pan-tilt, the state parameters of the motor, and the disturbance parameters.
[0014] In a third aspect, the present application provides an electronic 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 pan-tilt control method is implemented.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned pan-tilt control method is implemented.
[0016] In a fifth aspect, the present application provides a pod, which includes the above-mentioned pan-tilt control device.
[0017] In the pan-tilt control method, device, electronic device, pod and storage medium provided by the present application, during the process of performing attitude control on the pan-tilt based on the received instruction control parameters, by using the attitude parameters of the pan-tilt, the motor state parameters U m and the disturbance parameters d, a motor control amount of the pan-tilt is generated, so as to perform attitude control on the pan-tilt based on the motor control amount; in this way, the influence of disturbances on the pan-tilt, such as changes in the camera lens length, on the control accuracy of the pan-tilt can be reduced, and further the control accuracy of the pan-tilt can be improved.
[0018] To make the above-mentioned objects, features and advantages of the present application more obvious and understandable, the following specifically gives preferred embodiments and, in conjunction with the accompanying drawings, the detailed description is as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] One or more embodiments are exemplarily illustrated by corresponding drawings. These exemplary illustrations and the drawings do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements. The drawings do not constitute a proportional limitation, and among them:
[0020] Figure 1 Shows a comparison diagram of a control effect when the lens length changes.
[0021] Figure 2 Shows a schematic structural block diagram of a control device provided by the present application.
[0022] Figure 3 Shows an exemplary flowchart of a pan-tilt control method provided by the present application.
[0023] Figure 4 Shows an example diagram of the relationship between the lens coordinate system and the motor coordinate system.
[0024] Figure 5Shows a comparison diagram of another control effect when the lens length changes.
[0025] Figure 6 Shows an exemplary structural block diagram of the pan-tilt control device provided by the present application.
[0026] 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 implementation manners
[0027] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in some embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in some embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Components of the present application usually described and illustrated in the accompanying drawings herein can be arranged and designed in various different configurations.
[0028] 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 claimed present application, but merely represents some selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on some embodiments of the present application without creative efforts fall within the scope of protection of the present application.
[0029] It should be noted that like reference numerals and letters denote like items in the following drawings, and thus, 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 the present application, terms such as "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0030] It should be noted that, in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0031] The following will describe in detail some embodiments of the present application with reference to the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments may be combined with each other.
[0032] In a gimbal usage scenario such as the above, the target object can be photographed through a camera lens mounted on the gimbal, and based on different shooting requirements, a zoom operation can be performed on the camera.
[0033] Among them, in some possible scenarios, affected by the change in the working state of the gimbal, some system characteristic parameters of the gimbal system may change, resulting in a reduction in the gimbal control accuracy.
[0034] For example, when the gimbal is mounted on a drone and flying, the magnitude or direction of the wind resistance on the gimbal generally changes, resulting in a possible change in the unbalanced torque of the gimbal, such that the amount of attitude change of the gimbal operated by a user through a device such as a remote controller is different from the actual amount of attitude change of the gimbal, causing a reduction in the control accuracy of the gimbal.
[0035] For another example, during the process of performing a zoom operation on the 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 gimbal system including the camera may change.
[0036] Exemplarily, taking the camera lens length at a certain zoom ratio for calculation and illustration, at this camera lens length, combined with the electrical parameters of the gimbal motor, the electrical time constants of each rotating shaft can be expressed as:
[0037]
[0038] 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 armature resistance of the motor, K e represents the back electromotive force constant of the motor, and Kt represents the motor torque constant.
[0039] In the above calculation formula, R, K e , K t are all electrical parameters of the motor and can be directly read and obtained; while J represents the sum of the moments of inertia of the motor and the load, and its value is related to the camera lens length. When the camera lens length changes, the value of J will also change.
[0040] Moreover, when not considering the influence of the inductance of the DC motor, the rotational motion equation of the single-axis system can be expressed as follows:
[0041]
[0042] Wherein, θ and ω respectively represent the rotation angle and angular velocity of the pan-tilt, and K d represents the motor speed gain coefficient, and T L represents the sum of the frictional torque on a single axis and the unbalanced torque deviating from the equilibrium point, and u represents the armature current of the motor.
[0043] It can be seen that, combining the above formulas, 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 also changes, causing the rotation angle and angular velocity of the pan-tilt to change, and further reducing the control accuracy of the pan-tilt. For example, the rotation angle of the pan-tilt is lower than the received command angle.
[0044] For example, combining Figure 1 as shown, Figure 1 in the first change curve can indicate the angle change curve of the pan-tilt when the camera lens is the shortest, and the second change curve can indicate the angle change curve of the pan-tilt when the camera lens is the longest; through simple comparison, it can be found that when the camera lens becomes longer, there will be a large overshoot in the angle control of the pan-tilt, and the control effect is reduced.
[0045] Therefore, based on the above defects, some possible implementation manners provided by the present application are as follows:
[0046] In the process of attitude control of the pan-tilt, in addition to receiving control instruction parameters, it is also necessary to determine the motor control amount of the pan-tilt according to the attitude parameters of the pan-tilt, the motor state parameter U m and the disturbance parameter, and realize the attitude control of the pan-tilt according to the motor control amount. In the above process, the disturbance parameter includes not only the system disturbance parameter but also the dynamic disturbance parameter, and in the control process, the influence of the dynamic disturbance parameter on the attitude of the pan-tilt can be effectively avoided.
[0047] Please refer to Figure 2 , Figure 2 which shows a schematic structural block diagram of the control device 100 provided by the present application. The control device 100 can be a control unit of the pan-tilt, or a control unit of a drone, or other devices electrically connected to the pan-tilt for controlling the pan-tilt.
[0048] In some embodiments, the control device 100 may include a memory 101, a processor 102, and a communication interface 103. The memory 101, the processor 102, and the communication interface 103 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0049] The memory 101 can be used to store software programs and modules, such as the program instructions / modules corresponding to the pan-tilt control device provided in this application. The processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101, and then executes the steps of the pan-tilt control method provided in this application. The communication interface 103 can be used for signaling or data communication with other node devices.
[0050] Among them, the memory 101 can be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0051] The processor 102 can be an integrated circuit chip with signal processing capabilities. The processor 102 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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, discrete hardware components.
[0052] It can be understood that Figure 2 the structure shown is only schematic, and the control device 100 can also include more or fewer components than those shown Figure 2 in the figure, or have a different configuration from that shown Figure 2 in the figure. Figure 2 Each component shown in the figure can be implemented by hardware, software, or a combination thereof.
[0053] Next, taking the control device 100 shown Figure 2 as a schematic execution subject, the pan-tilt control method provided in this application will be described.
[0054] Please refer to Figure 3 ,Figure 3 An exemplary flowchart showing the pan-tilt control method provided by this application. In some embodiments, the pan-tilt control method may include the following steps:
[0055] Step S301: Obtain control instruction parameters, attitude parameters of the pan-tilt, motor state parameter Um, and disturbance parameters d; wherein, the disturbance parameters include dynamic disturbance parameters and system disturbance parameters;
[0056] Step S302: Perform attitude control on the pan-tilt according to the control instruction parameters, attitude parameters of the pan-tilt, motor state parameters, and disturbance parameters.
[0057] In some embodiments, the performing attitude control on the pan-tilt according to the control instruction parameters, attitude parameters of the pan-tilt, motor state parameters, and disturbance parameters includes:
[0058] Determine the motor control quantity according to the control instruction parameters, state parameters of the pan-tilt, and dynamic disturbance parameters;
[0059] Perform attitude control on the pan-tilt according to the motor control quantity, motor state parameter U m and the system disturbance parameters.
[0060] Among them, the dynamic disturbance parameters can be sent by other devices or determined by itself according to the current state of the pan-tilt.
[0061] Further, the determining the motor control quantity according to the control instruction parameters, attitude parameters of the pan-tilt, and dynamic disturbance parameters specifically includes:
[0062] Calculate the attitude control error of the pan-tilt according to the control instruction parameters and the attitude parameters of the pan-tilt;
[0063] Input the attitude control error and the dynamic disturbance parameters into a pre-set controller, and the result output by the controller is the motor control quantity.
[0064] Specifically, the control instruction parameters include: target angular acceleration, target angle, and target angular velocity; the attitude parameters of the pan-tilt include: measured angle and measured angular velocity.
[0065] Specifically,
[0066] The motor state parameter is current;
[0067] The method further includes: obtaining system state parameters, and the system state parameters include electrical time constant T m and motor speed gain coefficient K d ;
[0068] Calculate the motor control quantity according to the control instruction parameter, the attitude parameter of the pan-tilt head, the dynamic disturbance parameter, and the system state parameter.
[0069] In some alternative embodiments, the motor control quantity is calculated using the following formula:
[0070]
[0071] where u(t) represents the motor control quantity at the t-th moment; s(t) = ce θ (t) + e ω (t), c, k, and η are all pre-set controller parameters; α r (t) represents the target acceleration in the command control parameter received at the t-th moment; sgn(s) is the sign function; represents the dynamic disturbance parameter at the t-th moment; the electrical time constant T m and the motor speed gain coefficient K d ;
[0072] e θ (t) represents the angle error in the attitude control error, that is, the difference between θ r (t) and θ m (t); e ω (t) represents the angular velocity error in the attitude control error, that is, the difference between ω r (t) and θ m (t); θ r (t) represents the target angle in the command control parameter received at the t-th moment; ω r (t) represents the target angular velocity in the command control parameter received at the t-th moment; θ m (t) represents the measured angle in the attitude parameter of the pan-tilt head at the t-th moment; ω m (t) represents the measured angular velocity in the attitude parameter of the pan-tilt head at the t-th moment.
[0073] Specifically, obtaining the dynamic disturbance parameter may include:
[0074] Obtain the historical attitude parameter, historical motor control quantity, and system state parameter of the pan-tilt head;
[0075] Determine the dynamic disturbance parameter according to the historical attitude parameter of the pan-tilt head, the historical motor control quantity, and the system state parameter.
[0076] where the dynamic disturbance parameter is the current disturbance parameter of the pan-tilt head relative to the nominal working state under the current working state.
[0077] Determining the dynamic disturbance parameter according to the historical attitude parameter, historical motor control amount and system state parameter of the gimbal includes:
[0078] According to the historical motor control quantity, the historical motor control quantity and the system state parameter, the attitude deviation of the historical attitude parameter of the gimbal relative to the nominal attitude parameter is calculated; wherein the nominal attitude parameter is the attitude parameter of the gimbal in the nominal working state;
[0079] According to the attitude deviation and the historical disturbance parameters, the current disturbance parameters of the gimbal in the current working state relative to the nominal working state are calculated.
[0080] In some optional embodiments, the step of calculating the attitude deviation of the historical attitude parameter of the gimbal relative to the nominal attitude parameter includes:
[0081] Calculating estimated attitude parameters of the gimbal in the nominal working state based on a pre-configured observer;
[0082] 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.
[0083] In some optional embodiments, the obtaining of the system status parameter includes:
[0084] Adjust the pan / tilt head to the nominal working state;
[0085] According to the moment of inertia of the pan / tilt in the nominal working state, the system state parameters of the controller are calculated.
[0086] 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; for example, taking the camera lens in the preset state as an example, assuming that the 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.
[0087] Of course, it can be understood that the above is only an example, and the nominal working state of the gimbal is described. In some other possible embodiments of the present application, the nominal working state of the gimbal can also be the working state of the gimbal when the camera lens is in other states, and the present application does not limit this.
[0088] Based on this nominal working state, during the process of the control device executing the pan-tilt control method provided in this application, the control device can first calculate the current disturbance parameter of the pan-tilt relative to the nominal working state in the current working state according to the historical attitude parameters of the pan-tilt.
[0089] For example, the control device can adopt an iterative calculation method. Assume that the current moment is the t-th moment, where t is an integer greater than 1. Then the control device can determine the attitude parameter of the pan-tilt collected at the (t - 1)-th moment as the historical attitude parameter at the t-th moment; determine the attitude parameter of the pan-tilt collected at the t-th moment as the historical attitude parameter at the (t + 1)-th moment; determine the attitude parameter of the pan-tilt collected at the (t + 1)-th moment as the historical attitude parameter at the (t + 2)-th moment; and so on.
[0090] In some embodiments, the above-mentioned current disturbance parameter calculated by the control device can be used as the compensation amount for pan-tilt control. So that when the control device receives an attitude control instruction sent by a device such as a remote controller, it can use the received control instruction as the instruction control parameter for controlling the attitude of the pan-tilt, and combine the current attitude parameter of the pan-tilt and the current disturbance parameter calculated through step 201 to generate the motor control amount of the pan-tilt, so that the control device can perform attitude control on the pan-tilt based on this motor control amount; that is: during the process of the control device performing attitude control on the pan-tilt based on the instruction control parameter, it can use the calculated current disturbance parameter for compensation, thereby reducing the influence of changes in, for example, the length of the camera lens of the pan-tilt on pan-tilt control, and further improving the control accuracy of the pan-tilt.
[0091] Among them, in some embodiments, during the process of the control device executing step 201 to calculate the current disturbance parameter of the pan-tilt, the control device can, based on the differential calculation method, use the nominal working state of the pan-tilt as the reference object, determine the attitude parameter of the pan-tilt in the nominal working state as the nominal attitude parameter, and calculate the attitude deviation of the historical attitude parameter of the pan-tilt relative to the nominal attitude parameter.
[0092] For example, the control device can pre-configure an observer, and this observer corresponds to a state parameter, and this state parameter can indicate the state parameter of the pan-tilt in the nominal working state. For example, taking the above-mentioned camera lens length as an example, the length of the camera lens in this observer can be 20 mm as mentioned above, that is, the camera lens of the pan-tilt is in a preset state.
[0093] Based on this, during the process of the control device calculating the attitude deviation of the historical attitude parameter of the pan-tilt relative to the nominal attitude parameter, it can first calculate the estimated attitude parameter of the pan-tilt in the nominal working state based on this pre-configured observer.
[0094] For example, by way of illustration, taking the angular velocity and angle of the pan-tilt as the calculation dimensions of the attitude parameters, the calculation formula for the estimated attitude parameters of the pan-tilt in the nominal working state can be expressed as follows:
[0095]
[0096] In the formula, represents the estimated angle at the t-th moment; represents the estimated angle at the (t - 1)-th moment; h represents the time interval from the (t - 1)-th moment to the t-th moment; represents the estimated angular velocity at the t-th moment; represents the estimated angular velocity at the (t - 1)-th moment; T m represents the electrical time constant; K d represents the motor speed gain coefficient, and u(t - 1) represents the motor control amount at the (t - 1)-th moment; represents the estimated disturbance parameter at the (t - 1)-th moment; L represents the preset observer parameter; represents the attitude deviation at the (t - 1)-th moment, and its calculation formula can be expressed as follows:
[0097]
[0098] In the formula, and θ m (t - 1) represents the measured angle of the pan-tilt at the (t - 1)-th moment, and ω m (t - 1) represents the measured angular velocity of the pan-tilt at the (t - 1)-th moment.
[0099] Then, based on the estimated attitude parameters at the t-th moment calculated above (including the estimated angular velocity and the estimated angle ), the control device can subtract them from the historical attitude parameters of the pan-tilt at the t-th moment (including the measured angular velocity ω m (t) and the measured angle θ m (t) of the pan-tilt at the t-th moment), and determine the difference between the historical attitude parameters of the pan-tilt and the estimated attitude parameters as the attitude deviation of the historical attitude parameters of the pan-tilt relative to the nominal attitude parameters That is: In the way of iterative calculation, the calculation formula for this state deviation can be expressed as follows:
[0100]
[0101] In the formula, and θ m (t) represents the measured angle of the pan-tilt at the t-th moment, and ω m(t) represents the measured angular velocity of the pan-tilt at the t-th moment.
[0102] Then, based on the attitude deviation calculated above, the control device can calculate the current disturbance parameter of the pan-tilt in the current working state relative to the nominal working state according to the attitude deviation and the saved historical disturbance parameters.
[0103] For example, based on the iterative calculation method, the calculation formula of the current disturbance parameter can be expressed as follows:
[0104]
[0105] In the formula, represents the estimated disturbance parameter at the t-th moment; represents the estimated disturbance parameter saved at the (t - 1)-th moment; represents the attitude deviation at the (t - 1)-th moment; f represents a preset non-linear function, and its expression can be as follows:
[0106]
[0107] In the formula, ε represents the set observation error threshold. Among them, in some possible scenarios, when the attitude deviation calculated by the control device is small, compared with the linear function method, the above method provided by this application can improve the convergence speed during the estimation calculation of the disturbance parameter, so as to ensure that the disturbance parameter can be calculated more accurately in a shorter time.
[0108] It should be noted that the above implementation method provided by this application is only an example. When using the difference calculation method to calculate the estimated disturbance parameter at the t-th moment, iterative calculation is performed using the estimated disturbance parameter at the (t - 1)-th moment; in some other possible implementation methods of this application, the control device can also use methods such as differentiation, for example, using a pre-configured differentiation formula, taking the calculated attitude deviation as the input, without combining the estimated disturbance parameter of the previous moment, so as to obtain the current disturbance parameter.
[0109] In addition, in some possible scenarios, during the execution of step 203, the control device can combine a pre-set controller to process the command control parameter, the current attitude parameter of the pan-tilt, and the current disturbance parameter calculated above, so as to generate the motor control amount of the pan-tilt.
[0110] For example, in some possible implementation methods, when the control device calculates the attitude control error of the pan-tilt according to the control instruction parameter and the attitude parameter of the pan-tilt, taking angle and angular velocity control as an example, the calculation formula of the attitude control error of the pan-tilt can be expressed as follows:
[0111]
[0112] In the formula, e θ (t) represents the angular error in the attitude control error; e ω (t) represents the angular velocity error in the attitude control error; θ r (t) represents the angular parameter in the command control parameter at the t-th moment; ω r (t) represents the angular velocity parameter in the command control parameter at the t-th moment; θ m (t) represents the angular parameter in the attitude parameter of the pan-tilt at the t-th moment; ω m (t) represents the angular velocity parameter in the attitude parameter of the pan-tilt at the t-th moment.
[0113] 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, so as to use the result output by the controller as the motor control amount of the pan-tilt.
[0114] For example, in some possible implementation manners, the calculation formula of the motor control amount of the pan-tilt at the t-th moment can be expressed as follows:
[0115]
[0116] In the formula, u(t) represents the motor control amount at the t-th moment, and this parameter is a current value; s(t) = ce θ (t) + e ω (t), where c, k, and η are all pre-set controller parameters; α r (t) represents the acceleration in the command control parameter at the t-th moment; sgn(s) is a sign function.
[0117] In this way, after calculating the motor control amount u(t) of the pan-tilt at the t-th moment 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 pan-tilt based on the motor control amount.
[0118] It should be noted that, in some possible scenarios, the rotation axes of the pan-tilt generally include a heading axis, a pitch axis, and a roll axis. When obtaining the current attitude parameters of the pan-tilt, angle sensors provided on each rotation axis of the pan-tilt can be used to measure the attitude parameters of the pan-tilt in, for example, the heading direction, the pitch direction, and the roll direction. In some embodiments, the acceleration feedback by the IMU (Inertial Measurement Unit) on the lens can also be used to determine the angle of the pan-tilt.
[0119] However, due to the changes in the rotation angles of each rotation axis of the pan-tilt head, the IMU on the lens is not exactly 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.
[0120] Among them, as shown in Figure 4 Taking the angular velocity mapping as an example, when the camera lens of the pan-tilt head is in the 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 pan-tilt head rotates together with the roll and pitch motors. At this time, the motor coordinate system of the pan-tilt head still coincides with the lens coordinate system. Therefore, rotating the heading will not change the mapping relationship between the camera lens and the motor coordinate system.
[0121] When the camera lens of the pan-tilt head rotates by an angle around the roll axis, the frame where the pitch motor is located rotates together with the camera lens. At this time, the pitch motor axis of the pan-tilt head is still parallel to the lens pitch axis, but there is an angle between the heading axis C” axis of the lens and the motor heading axis Z, and the following mapping relationship exists:
[0122]
[0123] When the camera lens of the pan-tilt head rotates by an angle γ around the pitch axis, due to the rotation of the lens, there is an angle between the roll and heading motor axes of the pan-tilt head and the camera lens, and the following mapping relationship exists:
[0124]
[0125] When the camera lens of the pan-tilt head rotates by angles γ, Ψ in the pitch direction, roll direction, and heading direction respectively, the relationship between the lens coordinate system and the motor coordinate system of the camera is as shown in Figure 4 .
[0126] 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:
[0127]
[0128] Therefore, based on the above expression formula of the coordinate transformation matrix, before the control device calculates the attitude control error of the pan-tilt head according to the command control parameters and the current attitude parameters of the pan-tilt head, it can also substitute the attitude parameters of the camera lens of the pan-tilt head at the current moment into the above 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 attitude parameters of the pan-tilt head, that is: convert the coordinate parameters in the lens coordinate system to the pan-tilt head coordinate system, so as to decouple the current attitude parameters of the pan-tilt head, and use the current attitude parameters after coordinate transformation to perform the operation of calculating the operation control error of the pan-tilt head.
[0129] Exemplarily, taking the above angular velocity mapping as an example, based on the above coordinate transformation matrix, the calculation formula for decoupling the rotational angular velocity measured by the camera lens IMU to obtain the angular velocity of each motor axis can be expressed as follows:
[0130] ω = Ωω′……(13)
[0131] Where, ω′ is the angular velocity measured by the lens IMU, and ω is the angular velocity of each motor axis after coordinate transformation.
[0132] It should be noted that, combined with the above formula (9), it can be seen that when calculating the motor control amount of the pan-tilt head at the t-th moment, the calculation formula used includes some system state parameters of the controller, such as the electrical time constant T m , the motor speed gain coefficient K d and the preset controller parameters such as c, k, η, etc.; and combined with formula (1), it can be seen that the electrical time constant T m is a parameter related to the sum of the moments of inertia of the motor and the load, that is to say: the electrical time constant T m may be affected by the change in the length of the camera lens.
[0133] In some embodiments, when the control device calculates the motor control amount u(t) of the motor based on formula (9), the set electrical time constant T m can be used for calculation; but in order to improve the calculation accuracy of the motor control amount 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 pan-tilt head at the current moment, such as the above electrical time constant T m , so that the control device can calculate the motor control amount u(t) using the updated system state parameters of the controller, so as to improve the calculation accuracy of the motor control amount u(t), and thus improve the control accuracy of the pan-tilt head.
[0134] In addition, in combination with the above embodiments provided in this application, it can be known that for the pan-tilt control method provided in this application, it is necessary to use the nominal working state of the pan-tilt as a reference to calculate the current disturbance parameter of the pan-tilt in the current working state relative to the nominal working state, so as to compensate the command control parameter by using this current disturbance parameter to improve the control accuracy of the pan-tilt.
[0135] Among them, the above-mentioned nominal working state may refer to the working state of the pan-tilt when the camera lens of the pan-tilt is in a preset state. For example, in the above example, the nominal working state may be the working state of the pan-tilt when the length of the camera lens is 20 mm. When calculating, it is necessary to use the system state parameters of the controller when the pan-tilt is in the nominal working state to participate in the calculation. For example, the electrical time constant T when the pan-tilt is powered on m .
[0136] Therefore, in some possible embodiments, before the control device executes step 301, when the pan-tilt is powered on, the control device can adjust the pan-tilt to the nominal working state, and calculate the system state parameters of the controller according to the moment of inertia of the pan-tilt in the nominal working state, so as to apply the calculated system state parameters in the above calculation process; for example, when the pan-tilt is powered on, the control device can calculate the electrical time constant T in the way of formula (1) m , and the calculated electrical time constant T m is applied in the calculation processes of formula (2), formula (3) and formula (9).
[0137] Among them, by way of example, taking the length of the camera lens of the pan-tilt as the consideration dimension of the nominal working state, when the control device adjusts the pan-tilt to the nominal working state, it can adjust the camera lens of the pan-tilt to the preset state, such as adjusting the length of the camera lens to 20 mm in the above example, so that the pan-tilt is in the nominal working state.
[0138] Of course, it can be understood that the above method is only an example, and the system state parameters of the controller when the pan-tilt is powered on are calculated by an automatic calculation method; in some other possible embodiments of this application, the control device can also obtain the initial system state parameters of the controller by receiving the input from other devices or user settings.
[0139] Next, based on some pan-tilt control scenarios, the pan-tilt control method provided in this application will be illustrated by examples.
[0140] A sliding mode controller and a disturbance observer can be run in the control device. When the motors and loads of each axis of the pan-tilt are working, the working current u of the pan-tilt can be collected respectively through the set current sensor, angular velocity sensor and angle sensor m , the decoupled angular velocity ω mand the angle θ m ; and, when the pan-tilt is powered on, the control device can calculate the electrical time constant T in the manner of, for example, the above formula (1) m and other system state parameters
[0141] In some possible scenarios, the remote controller can send the command acceleration α r and the command angular velocity ω r and the command angle θ r and other command control parameters to the pan-tilt to control the pan-tilt to adjust its attitude
[0142] Among them, in the process of the control device executing the pan-tilt control method provided by this application, the disturbance observer running in the control device can perform iterative calculations based on algorithms such as the above formula (3) and formula (4), and use the motor control quantity u(t - 1) saved at the previous calculation moment and attitude parameters such as the angle and angular velocity to obtain the attitude deviation at the previous calculation moment Then, the disturbance observer can, based on algorithms such as the above formula (5) and formula (6), use the disturbance parameters saved at the previous calculation moment the attitude deviation calculated at the previous calculation moment the angular velocity ω measured by the angular velocity sensor m and the angle θ measured by the angle sensor m to calculate the disturbance parameter at the current moment and output the disturbance parameter to the sliding mode controller running in the control device; correspondingly, the sliding mode controller can, based on algorithms such as the above formula (8) and formula (9), use the calculated electrical time constant T m the pre-configured motor speed gain coefficient K d the disturbance parameter at the current moment obtained by calculation the received command acceleration α r the command angular velocity ω r the command angle θ r the measured angular velocity ω m and the angle θ m as inputs, so as to calculate the motor control quantity u(t) of the pan-tilt at the current moment, and output the motor control quantity u(t) to the current controller, and then the current controller controls the pan-tilt according to the obtained motor control quantity u(t) and the working current u measured by the current sensor m to adjust the attitude of the pan-tilt
[0143] Among them, in order to illustrate the control effect of the pan-tilt control method provided by this application, as shown in Figure 5 shown Figure 5The change curve 1 in it can indicate the angle change curve of the pan-tilt when the camera lens is the shortest, and the change curve 2 can indicate the angle change curve of the pan-tilt when the camera lens is the longest; it can be seen that even when the camera lens changes within the range from the shortest to the longest, the angle control of the pan-tilt does not show overshoot, improving the control effect.
[0144] 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 which shows an exemplary structural block diagram of the pan-tilt control device 300 provided in this application. In some possible implementation manners, the pan-tilt control device 300 may include a processing module 301 and a control module 302.
[0145] The processing module 301 is configured to obtain control instruction parameters, attitude parameters of the pan-tilt, motor state parameters, and disturbance parameters; wherein, the disturbance parameters include dynamic disturbance parameters and system disturbance parameters;
[0146] The control module 302 is configured to perform attitude control on the pan-tilt according to the control instruction parameters, attitude parameters of the pan-tilt, motor state parameters, and disturbance parameters.
[0147] In some optional embodiments, when the control module 302 performs attitude control on the pan-tilt according to the control instruction parameters, attitude parameters of the pan-tilt, motor state parameters, and disturbance parameters, it is specifically configured to:
[0148] Determine a motor control quantity according to the control instruction parameters, state parameters of the pan-tilt, and dynamic disturbance parameters;
[0149] Perform attitude control on the pan-tilt according to the motor control quantity, the motor state parameter U m and the system disturbance parameters.
[0150] In some optional embodiments, when the control module 302 determines a motor control quantity according to the control instruction parameters, state parameters of the pan-tilt, and dynamic disturbance parameters, it is specifically configured to:
[0151] Calculate the attitude control error of the pan-tilt according to the control instruction parameters and the attitude parameters of the pan-tilt; input the attitude control error and the dynamic disturbance parameters into a pre-set controller, and the result output by the controller is the control quantity of the motor.
[0152] In some optional embodiments, the control instruction parameters include: target angular acceleration, target angle, and target angular velocity;
[0153] The attitude parameters of the pan-tilt include: measured angle and measured angular velocity.
[0154] In some alternative embodiments, the motor state parameter is current;
[0155] When the processing module obtains the control instruction parameter, the attitude parameter of the pan-tilt head, and the motor state parameter U m and the disturbance parameter d, it is further configured to:
[0156] Obtain the system state parameter, where the system state parameter includes the electrical time constant and the motor speed gain coefficient;
[0157] When the control module performs attitude control on the pan-tilt head according to the control instruction parameter, the attitude parameter of the pan-tilt head, the state parameter of the motor, and the disturbance parameter, it is specifically configured to:
[0158] Calculate the motor control amount according to the control instruction parameter, the attitude parameter of the pan-tilt head, the dynamic disturbance parameter, and the system state parameter.
[0159] In some alternative embodiments, the processing module 301 calculates the motor control amount using the following formula:
[0160]
[0161] where u(t) represents the motor control amount at the t-th moment; s(t) = ce θ (t) + e ω (t), where c, k, and η are all pre-set controller parameters; α r (t) represents the target acceleration in the instruction control parameter received at the t-th moment; sgn(s) is the sign function; represents the dynamic disturbance parameter at the t-th moment; the electrical time constant T m and the motor speed gain coefficient K d ;
[0162] e θ (t) represents the angle error in the attitude control error, that is, the difference between θ r (t) and θ m (t); e ω (t) represents the angular velocity error in the attitude control error, that is, the difference between ω r (t) and θ m (t); θ r (t) represents the target angle in the instruction control parameter received at the t-th moment; ω r (t) represents the target angular velocity in the instruction control parameter received at the t-th moment; θ m (t) represents the measured angle in the attitude parameter of the pan-tilt head at the t-th moment; ω m(t) represents the measured angular velocity in the attitude parameters of the pan-tilt head at the t-th moment.
[0163] In some alternative embodiments, when the processing module 301 obtains the dynamic disturbance parameter, it is specifically configured to:
[0164] Obtain the historical attitude parameters, historical motor control quantities, and system state parameters of the pan-tilt head;
[0165] Determine the dynamic disturbance parameter according to the historical attitude parameters, the historical motor control quantities, and the system state parameters of the pan-tilt head.
[0166] In some alternative embodiments, before calculating the attitude deviation of the historical attitude parameters of the pan-tilt head relative to the nominal attitude parameters according to the historical attitude parameters of the pan-tilt head, the processing module 301 is further configured to:
[0167] When the pan-tilt head is powered on, adjust the pan-tilt head to the nominal working state;
[0168] Calculate the system state parameters of the controller according to the moment of inertia of the pan-tilt head in the nominal working state.
[0169] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to some embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function.
[0170] It should also be noted that in some alternative implementation manners, the functions marked in the blocks may occur in a different order from 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 reverse order, depending on the functions involved.
[0171] It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0172] In addition, in some embodiments of the present application, the various functional modules may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
[0173] When the above 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 this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in some embodiments of this 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 discs.
[0174] The above description is only part of the embodiments of this application and is not intended to limit this application. For those skilled in the art, this application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection scope of this application.
[0175] For those skilled in the art, it is obvious that this application is not limited to the details of the above exemplary embodiments, and without departing from the spirit or basic characteristics of this application, this application can be implemented in other specific forms. Therefore, from any perspective, the embodiments should be regarded as exemplary and non-limiting. The scope of this application is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in this application. Any reference signs in the claims should not be regarded as limiting the claims involved.
Claims
1. A pan-tilt control method, wherein the pan-tilt comprises a motor, characterized in that: include: Get the control command parameters, the gimbal attitude parameters, and the motor state parameters U m , disturbance parameter d and system state parameter; wherein the disturbance parameter includes dynamic disturbance parameter and system disturbance parameter; the system state parameter includes electrical time constant and motor speed gain coefficient; Calculating the attitude control error of the gimbal according to the control instruction parameters and the attitude parameters of the gimbal; inputting the attitude control error, the system state parameters and the dynamic disturbance parameters into a pre-set controller, and the result output by the controller is the motor control amount; According to the motor control quantity, the motor state parameter U m and the system disturbance parameters, to perform attitude control on the gimbal; The control instruction parameters include: target angular acceleration, target angle and target angular velocity; the gimbal posture parameters include: measured angle and measured angular velocity; the motor state parameter is current; the motor control amount is calculated using the following formula: Where u(t) represents the motor control quantity at the tth moment; s(t) = ce θ (t)+e ω (t), c, k and η are all pre-set controller parameters; α r (t) represents the target acceleration in the command control parameter received at the tth moment; sgn(s) is the sign function; Represents the dynamic disturbance parameter at time t; electrical time constant T m and motor speed gain factor K d ; e θ (t) represents the angle error in the attitude control error, i.e., θ r (t) and θ m (t); e ω (t) represents the angular velocity error in the attitude control error, that is, ω r (t) and θ m (t) difference; θ r (t) represents the target angle in the command control parameter received at the tth moment; ω r (t) represents the target angular velocity in the command control parameter received at the tth moment; θ m (t) represents the measured angle in the gimbal’s attitude parameters at the tth moment; ω m (t) represents the measured angular velocity in the gimbal’s attitude parameters at the t-th moment.
2. The method according to claim 1, characterized in that Obtaining the dynamic disturbance parameter includes: Obtaining historical attitude parameters, historical motor control quantities and system state parameters of the gimbal; The dynamic disturbance parameter is determined according to the historical posture parameter of the gimbal, the historical motor control amount and the system state parameter.
3. The method according to claim 1, characterized in that The obtaining of the system status parameter comprises: Adjusting the pan / tilt head to a nominal working state; The system state parameter is calculated according to the rotational inertia of the pan / tilt platform in the nominal working state.
4. A pan / tilt control device, characterized in that: include: A processing module is used to obtain control instruction parameters, the posture parameters of the gimbal, and motor state parameters U m , disturbance parameter d and system state parameter; wherein the disturbance parameter includes dynamic disturbance parameter and system disturbance parameter; the system state parameter includes electrical time constant and motor speed gain coefficient; A control module is used to calculate the attitude control error of the gimbal according to the control instruction parameters and the attitude parameters of the gimbal; the attitude control error, the system state parameters and the dynamic disturbance parameters are input into a pre-set controller, and the result output by the controller is the motor control amount; The control module is also used to control the motor control quantity and the motor state parameter U m and the system disturbance parameters, to perform attitude control on the gimbal; The control instruction parameters include: target angular acceleration, target angle and target angular velocity; the posture parameters of the gimbal include: measured angle and measured angular velocity; the motor state parameter is current; The processing module calculates the motor control amount using the following formula: Where u(t) represents the motor control quantity at the tth moment; s(t) = ce θ (t)+e ω (t), c, k and η are all pre-set controller parameters; α r (t) represents the target acceleration in the command control parameter received at the tth moment; sgn(s) is the sign function; Represents the dynamic disturbance parameter at time t; electrical time constant T m and motor speed gain factor K d ; e θ (t) represents the angle error in the attitude control error, i.e., θ r (t) and θ m (t); e ω (t) represents the angular velocity error in the attitude control error, that is, ω r (t) and θ m (t) difference; θ r (t) represents the target angle in the command control parameter received at the tth moment; ω r (t) represents the target angular velocity in the command control parameter received at the tth moment; θ m (t) represents the measured angle in the gimbal’s attitude parameters at the tth moment; ω m (t) represents the measured angular velocity in the gimbal’s attitude parameters at the t-th moment.
5. The PTZ control device according to claim 4, characterized in that: When acquiring the dynamic disturbance parameter, the processing module is specifically used to: Obtaining historical attitude parameters, historical motor control quantities and system state parameters of the gimbal; The dynamic disturbance parameter is determined according to the historical posture parameter of the gimbal, the historical motor control amount and the system state parameter.
6. The PTZ control device according to claim 4, characterized in that: The process of the processing module obtaining the system state parameter is specifically as follows: When the pan / tilt platform is powered on, the pan / tilt platform is adjusted to a nominal working state; The system state parameter is calculated according to the rotational inertia of the pan / tilt platform in the nominal working state.
7. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor executes the method according to any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are configured to execute the method according to any one of claims 1 to 3.
9. A pod, characterized in that: It comprises a pan / tilt control device as described in any one of claims 4 to 6.
Citation Information
Patent Citations
Pan-tilt control method and device, storage medium, electronic equipment and unmanned aerial vehicle
CN110989691A
Pan-tilt control method, controller, pan-tilt, unmanned mobile platform and storage medium
CN112154398A