Professional Documents
Culture Documents
UAV
Xiangdong Qin, Tingting Wang
School of Mechanical and Electrical Engineering, Hohai University, Changzhou 213022, China
E-mail: 1. 956143376@qq.com
Abstract: The problems of tracking moving target of quad-rotor UAV involve target tracking in image sequence and flight
control of UAV. Because Camshift algorithm is easily disturbed by background with similar color and has poor robustness
to occlusion interference when tracking objects in image sequence. A new tracking algorithm based on Kalman filter and
Camshift algorithm with multi-feature fusion is proposed. On this basis, the horizontal displacement between the target and
the UAV is calculated as the control input, and a position-attitude outer-inner loop controller is designed to ensure the target
near the center of view of the camera in order to track the target efficiently. Experimental and simulation results verify the
performance of the algorithm.
Key Words: quad-rotor UAV; target tracking; Camshift algorithm; outer-inner loop control
978-1-7281-0106-4/19/$31.00 2019
c IEEE 3564
previous frame, so as to locate the central position of the The combined algorithm uses Kalman filter to predict
target in the current image[8]. the center position of the search window in Camshift
algorithm. The specific implementation steps are as
2.2 Kalman Filter Method
follows.
Kalman filter is a common method to solve optimal
Table 1: Combinational Algorithm Flow
state estimation in system state estimation theory. It
recursively realizes the optimal estimation of the state of
Algorithm
the current moment by estimating the state of the previous
moment and observing the state of the current moment. Step 1: Select the tracking target with the mouse
Kalman filter is applied to target tracking. The motion and determine the search window.
state parameters of the target in the image sequence are Step 2: Initialize of Kalman filter by using search
obtained by prediction and updating, so that the position window centroid position.
of the target in image sequence can be predicted. Step 3: Predict centroid position of target by using
Kalman filter.
2.3 A Modified Camshift Algorithm
Step 4: Calculate centroid position of target by
A good tracking template is the premise of reliable using the modified Camshift algorithm.
tracking in target tracking process. CamShift template Step 5: If the target is occluded, the predicted
uses the traditional color probability distribution map, that value of Kalman filter is used as the observation
is, only the H component in HSV color model is counted value to correct Kalman filter.
and used as a template, which leads to a single tracking Else, the output value of Camshift
feature in the process of target tracking. When the algorithm is used as the observation value to
background is close to the H value of the target, the update Kalman filter.
tracking accuracy of the target decreases. Considering the Step 6: Go to Step 3.
strong stability of texture feature and edge feature, they
are introduced into the tracking template to establish
three-dimensional histogram of color feature, LBP texture In the algorithm flow, the Bhattacharyya distance d Bha
feature and edge direction feature. This adaptive weighted between the current frame target image and the hue
fusion multi-feature algorithm improves the problem that histogram of the previous frame target image is calculated
the original CamShift algorithm has a single template to determine when the target is occluded. A threshold Tb
information and is susceptible to the interference of can be set. If d Bha ≥ Tb is satisfied, the target begins to
similar color background. be occluded. The value of Tb is 0.35 in this paper.
A prediction mechanism can predict the next frame
3 Design of Target Tracking Controller
position of the target. At present, Kalman filter algorithm
and particle filtering algorithm are commonly used. The target tracking algorithm is designed to get the
Because Kalman filter has the characteristics of small pixel position of the target in the image sequence. Then
computation and high real-time performance, and the time the horizontal displacement between the UAV and the
of shooting two adjacent frames of video is very short, the target is calculated and the tracking controller of the
target can be approximately considered as moving at a quadrotor is designed to ensure that the target is always
uniform speed. In order to solve the problem of tracking near the center of the field of vision obtained by the
failure caused by obstacle occlusion and considering the airborne camera.
real-time requirement of target tracking, Kalman filter is 3.1 Dynamics Model of Quadrotor
used to predict target position in this paper. Therefore,
In order to establish the mathematical model of a
Kalman filter combining with Camshift algorithm for
quad-rotor UAV, it is assumed that: 1) The aircraft is a
adaptive weighted multi-feature fusion is proposed in this
cross-symmetrical rigid body structure. 2) The origin of
paper.
the body coordinate system is located at the geometric
The 31th Chinese Control and Decision Conference (2019 CCDC) 3565
center of the body. 3) The influence of drag on aircraft is In the formula, l is the distance from the center of the
not considered. 4) The lift generated by the motor is
propeller to the center of the quadcopter. J xx , J yy and
proportional to the square of the rotational speed.
In this paper, the flight mode of UAV is chosen as cross J zz are the moment of inertia and they are all constant.
mode which is shown as Figure 1. m is the quality of UAV.
The motion of quadrotor consists of three axial linear U1 , U 2 , U 3 and U 4 are four control input
motions and angular motions around three axes. In order variables.
to describe the motion state of a quadcopter conveniently
U1 = F1 + F2 + F3 + F4
and accurately, inertial coordinate frame °U = F − F
° 2
I = {xi , yi , z i } and quadcopter body coordinate frame
4 2
® (2)
U = F − F
B = {xb ,y b ,z b } are established. ° 3 3 1
°¯U 4 = F1 − F2 + F3 − F4
3566 The 31th Chinese Control and Decision Conference (2019 CCDC)
subsystem. The controlled variable U is obtained by the So, the horizontal displacement ( xd ,y d ) of the target
inner-loop attitude subsystem from the desired angle. and UAV in the world coordinate frame is obtained from
ec as the input of the tracking controller by Formual(3).
Therefore, virtual control variable ȝ = [ ȝ x ,ȝ y ,ȝ z ]T is
The overall structure of the ground target tracking
introduced. controller for UAV is shown in Fig.2.
[
°φ = arctan cos φ (sinψ ⋅ μ − cosψ ⋅ μ ) μ
¯ d d x y z ] Attitude feedback
Dynamics model of quadrotor
Position feedback
(5)
So, for outer-loop position subsystem, PD control Fig. 2: Overall architecture of tracking controller
method is designed as follows.
. ..
4 Experiment Results and Analysis
°μ x = − k px ⋅ xe − k dx ⋅ x e + m ⋅ x d
. ..
°° 4.1 Simulation Verification of Controller
®μ y = −k py ⋅ ye − k dy ⋅ y e + m ⋅ y d (6)
° . .. Performance
°μ z = −k pz ⋅ z e − k dz ⋅ z e + m ⋅ z d + mg
°¯
In order to verify the performance of the designed
In the above formula, xe = x − xd , ye = y − y d and tracking controller, the reference input of the UAV is
ze = z − zd . given as follows: xd = 4 , yd = 4 , z d = 3 , ψ d = 1 rad.
Backstepping control algorithm is adopted for The simulation results of position and attitude
inner-loop attitude control. Take the expression of U 2 as controller are shown in Fig. 3 and Fig. 4.
an example.
1 ª ⋅⋅ ⋅ ⋅ º
U2 = «φ d + (c12 + 1) z1 − a1 θ ψ − (c1 + c2 ) z 2 » (7) 6
b2 ¬ ¼ 4
⋅ ⋅
where z1 = φ − φd , z 2 = φ − φ d + c1 z1 , a1 = ( I y − I z ) I x , 2 xd
x1
x2
0
0 1 2 3 4 5 6 7 8 9 10
b1 = l I x . Time(s)
6
In order to ensure that the UAV follows the ground
4
target, it is necessary to ensure that the target is always
y
2 yd
image plane is 4
ec = c*p − cp 2
z
(8) zd
1 z1
z2
0
0 1 2 3 4 5 6 7 8 9 10
where c p * and c p are the coordinates of the image Time(s)
The 31th Chinese Control and Decision Conference (2019 CCDC) 3567
1
-1
1 (degree)
2 (degree)
-2
0 1 2 3 4 5 6 7 8 9 10
Time(s)
2
1
0
-1 1
(degree)
2
(degree)
-2
0 1 2 3 4 5 6 7 8 9 10
Time(s)
Fig. 5: Quadcopter UAV platform
1.5
1 2 3 4 5 6 7 8 9 10
Time(s)
1
As is shown in Figure 6, this work process is explained
(degree)
0.5 d
1
(degree) with a schematic diagram, where airborne camera takes
(degree)
0
2
pictures, and the images are transferred to Intel NUC
0 1 2 3 4 5 6 7 8 9 10
Time(s) board to calculated the horizontal distance between target
and camera centre. Eventually, results will be sent to N3
Fig. 4: Response curve of attitude controller
flight controller.
[ x2 ,y2 ,z2 ,ij2 ,ș2 ,ȥ 2 ] represents position and attitude N3 Flight controller Onboard-SDK
Quadrotor
3568 The 31th Chinese Control and Decision Conference (2019 CCDC)
International Conference on Robotics and Biomimetics,
2399-2405, 2012.
The above experimental results show that the proposed [6] Z. Y. Li, Y. F. Xu, G. L. Yang, Simulation of UAV flight control for
tracking algorithm can deal with short-time background tracking ground target, Science Technology and Engineering,
color interference and obstacle occlusion. According to Vol.8, No.5, 1374-1378, 2008.
many flight tracking experimentsˈ compared with single [7] J. Z. Yu, H. X. Liu, C. Y. Liu, Application of AMAUKF on the
Camshift algorithm or Kalman filter algorithmˈ the condition of target re-tracked by UAV, Computer Measurement &
improved tracking algorithm in this paper has been Control, Vol.20, No.2, 516-519, 2012.
greatly improved in accuracy and reliability. [8] L. Wang, Z. J. Li, Z. P. Chen, X. M. Ma, R. Zhang, R. You, The
Application of Improved Camshift Algorithm in Hand Tracking,
5 Conclusion and Futurework
International Conference on Industrial Informatics-Computing
In this paper, the ground moving target tracking Technology, Intelligent Technology, Industrial Information
problem of Four-rotor UAV is studied, and a tracking Integration, 87-90, 2017.
algorithm based on a modified Camshift algorithm [9] L. Ma, C. X. Mu, X. Chao, W. K. Yang., H. P. He, Design of
combining with Kalman filter is proposed, which can deal Target Tracking System for Quad-rotor UAV, Control Engineering
with the problem of target tracking failure caused by of China, Vol.22, No.6, 1076-1081, 2015.
background color interference and obstacle occlusion for [10] J. F. Lin, Study of Flight Control Algorithm for Quad-rotor Aircraft,
a short time. In order to ensure that the target is always Nanchang University, 2015.
near the central position of the image field obtained by the
airborne wireless camera, a position-attitude outer-inner
loop controller is designed, which can track the target
effectively while ensuring flight stability. The simulation
and experiment results show that the designed tracking
system has good performance. In the next research, the
more efficient target tracking algorithm and flying control
system will be combined to implement exploration in
more complex environment.
Reference
[1] Z. Wang, X. J. Yang, Moving Target Detection and Tracking Based
on Pyramid Lucas-Kanade Optical Flow, International Conference
on Image, Vision and Computing, 66-69, 2018..
The 31th Chinese Control and Decision Conference (2019 CCDC) 3569