Design and Implementation of UAV Self Stabilizing PTZ

In this paper, a simple and practical two axis UAV self-stabilizing PTZ is designed and implemented. By connecting UAV and camera, UAV can stably track and shoot specific targets.


Introduction
When a small UAV takes aerial photos of a specific target, due to the interference of various random factors, the attitude, flight height and angle of the UAV will constantly change, and the camera fixed on the UAV will also change its attitude, which may cause the loss of aerial capture scene.
As the connection device between the UAV and the camera, the self stabilizing PTZ can avoid the interference of the camera to capture the target caused by the aircraft's own attitude change, so that the camera can stably track the target for shooting.

Function of PTZ
When the UAV is disturbed and shakes, the parallax of the self stabilizing PTZ will produce deviation. The inertial sensor and the angular position sensor are installed on the PTZ to form a closed-loop loop with stable parallax. The angular motion of the camera is transmitted back to the PTZ through the sensitive elements. According to this deviation, the control algorithm is designed. By using the steering gear to control the angular position of the PTZ, the PTZ can be disturbed Automatic adjustment in a stable state, to achieve the target tracking. The workflow of self stabilizing PTZ is shown in Figure 1.

Mechanical structure design of PTZ
At present, the PTZ includes two axis stable PTZ and three axis follow-up PTZ. The two-axis stable PTZ has the advantages of simple design and easy control. It is widely used when the accuracy However, due to the limited load capacity of small UAV, the airborne self stabilizing PTZ should be light in weight, small in volume, simple and stable. Therefore, the two axis stabilized PTZ is used as the airborne self stabilized PTZ.
The horizontal U-type two-dimensional turntable adopts two-point symmetrical simply supported beam structure with large rigidity and small bending deflection, and there is space for additional load arrangement in the middle and upper part of the structure, so the comprehensive performance is better. Therefore, the two-axis stable PTZ adopts the U-type structure layout, which meets the technical requirements of the two-axis stable PTZ. Figure 2 is the mechanical structure design of the two axis stable PTZ

Tracking and control of self stabilizing PTZ
In order to realize the self stabilization function of PTZ, the Eulerian angle method is used to build the model. On the basis of the attitude description of the UAV's airborne PTZ, the attitude position of the PTZ is further calculated and updated in real time.
Then establish the target coordinate system and image coordinate system, calculate the position information of the target relative to the camera (i.e. the PTZ), calculate the error between them, control the PTZ rotation to correct the error to achieve the target tracking.

Establishment of PTZ tracking
The real-time solution of the updated attitude angle equation of the PTZ is obtained by using the Euler angle method, namely: The two axis stabilized PTZ is a two degree of freedom turntable in the horizontal and vertical directions, so the equation can be simplified as: According to formula (2), the position coordinate transformation between the tracking target and the PTZ can be obtained, that is, the position information relative to the PTZ target, and the PTZ rotation can be controlled to correct the error between the camera's Los center and the target, so as to realize the tracking of the target, namely:

PID control of PTZ tracking
The model of PTZ tracking is established, and PID control algorithm is used to complete the self stable control of PTZ. PID control algorithm consists of three parts: proportion, integral and differential. The schematic diagram of the control system is shown in Figure 3.  The expression of PID control law in discrete time system is as follows.
Among them, the parameters d K , i K and s K represent the proportional coefficient, integral coefficient and differential coefficient under the discrete PID control respectively.The parameter d K is consistent with the continuous PID. Assuming that the sampling period of the system is T, the parameters i K , s K and i T , s T have the following corresponding relations Among the three parameters of the discrete PID control, the proportional coefficient d K represents the direct amplification coefficient of the control deviation signal at this time, the integral coefficient i K represents the strength of its corresponding integral link and the differential coefficient s K represents the strength of its corresponding differential link.

Simulation and verification of self-stable PTZ model
According to the tracking model of self-stabilizing PTZ, build a simulation diagram to verify the model stability, as shown in Figure 4:  Running the simulation diagram, the stability results of pitch channel and yaw channel are shown in Figure  5 Pitch channel stability results Yaw channel stability results Figure 5. simulation results.
According to the simulation results, the pitch and yaw channel output is stable, and the established model has good stability.The physical object of the self stabilizing PTZ designed in this paper is shown in the figure 6

Conclusion
In aerial photography UAV, the self stabilizing PTZ described in this paper is used to connect the camera, which achieves better shooting effect for specific tracking target. It shows that the model of stable tracking of the self stabilizing PTZ designed and implemented in this paper is correct, the mechanism and control actuator are effective, the function of the self stabilizing PTZ of UAV is achieved, and the price is very low.