Autonomous Vision-Based Target Detection and Safe Landing For UAV
Autonomous Vision-Based Target Detection and Safe Landing For UAV
http://dx.doi.org/10.1007/s12555-018-0017-x http://www.springer.com/12555
Abstract: Target detection is crucial for many applications of Unmanned Aerial Vehicles (UAVs) such as search
and rescue, object transportation, object detection, inspection, and mapping. One of the considerable applications
of target detection is the safe landing of UAV to the drone station for battery charging and its maintenance. For
this, vision-based target detection methods are utilized. Generally, high-cost cameras and expensive CPU’s were
used for target detection. With the recent development of Raspberry Pi (RPi), it is possible to use the embedded
system with cheap price for such applications. In the current research, RPi based drone target detection and safe
landing system are proposed with the integration of PID controller for target detection, and Fuzzy Logic controller
for safe landing. The proposed system is equipped with a USB camera which is connected to RPi for detecting the
target and a laser rangefinder (LIDAR) for measuring the distance for safe landing. To verify the performance of
the developed system, a practical test bench based on a quadcopter and a target drone station is developed. Several
experiments were conducted under different scenarios. The result shows that the proposed system works well for
the target finding and safe landing of the quadcopter.
Keywords: Fuzzy logic, ground effect, quadcopter, safe landing, target detection.
1. INTRODUCTION Detecting the ground target and safe landing is the most
challenging part, as any mistake in any of them can lead
Quardcopter, also known as a quadrotor, is one type of the quadcopter to tip over, which will cause the destruction
UAV, which is lifted and propelled by four rotors [1, 2]. of the quadcopter or even harm any human in its range due
The quadcopter has high maneuverability, as it can hover, to the big size of the propellers and high rpm used in it.
take off, cruise and land in narrow areas. Quadcopters There have been a lot of research regarding target de-
have simpler control mechanism compared to the other tection and safe landing. In [9], a target detection algo-
UAVs [3]. rithm based on GPS and camera is proposed. Other re-
Recently, there have been increasing interests in the search presents an image processing based target detec-
UAVs applications such as surveillance, search and res- tion algorithm using high specification CPU’s [10]. In
cue, and object detection [4–8]. Especially, target detec- [11, 12], several ways to control the drone using cloud
tion is an important pre-function in the UAVs applications, computing-based vision is proposed. Also, there are num-
as it is required for a safe landing to drone station for bat- bers of works that focus on the communication between
tery charging or some other tasks. However, detecting a the drone and the ground target [13]. Some researchers
target, and landing is not an easy task due to the lack of were trying to detect and track shaped targets cite14,15,
sensitivity of sensors used for this application. For these while others tried to detect people and vehicle [16]. In
applications, image processing techniques are generally [17, 18], an image processing algorithm, that works using
used. color detection by a camera is proposed.
The autonomous quadcopter system can be divided into One of the most challenging parts of target detection is
four processes: the timing of the image processing. So, the best way is to
use a graphical processing unit (GPU) which is optimized
1) Taking off. for imaging algorithms.
2) Performing the task. Most of the prior research shows good performance.
3) Detection of the ground target. However, they are either using a normal navigator GPS
to detect the position of the target, which is not accurate,
4) Safe landing. as the used GPS accuracy is limited to 7-8 m and GPS
Manuscript received January 10, 2018; revised April 28, 2018; accepted June 5, 2018. Recommended by Associate Editor Son-cheol Yu
under the direction of Editor Jessie (Ju H.) Park.
Mohammed Rabah, Ali Rohan, and Muhammad Talha are with the School of Electronics and Information Engineering, Kunsan National
University, Korea (e-mails: [email protected], [email protected], [email protected]). Kang-Hyun
Nam and Sung Ho Kim are with Kunsan National University, Korea (e-mails: {khnam, shkim}@kunsan.ac.kr).
* Corresponding author.
⃝ICROS,
c KIEE and Springer 2018
3014 Mohammed Rabah, Ali Rohan, Muhammad Talha, Kang-Hyun Nam, and Sung Ho Kim
(a) (b)
4.2.2 Defuzzification
When the quadcopter is landing at a certain altitude,
corresponding rules are used to generate the practical
throttle adjustment value for a safe landing. There are
many defuzzification methods for this. In this work, we
utilize the Center of Gravity (CoG) method [25]. Throttle
adjustment values calculated from CoG method are added
or subtracted from throttle percentage value as in (4). Fi-
nally, the output of the fuzzy logic controller is given to
flight controller as shown in Fig. 6.
PID controller for target detection keeps on calculating the the landing under IGE threshold. Also, in Fig. 12(b), it
roll and pitch values to make both centroids coincide with can be seen that fuzzy logic based landing controller keeps
each other. Simultaneously altitude information from the landing velocity constant at the desired value, and chang-
LIDAR sensor is used for safe landing algorithm. In Sce- ing the gain value will affect the settling time. In both
nario 2, to avoid any effect from the ground effect, both figures, the gain value of 1.05 shows the best response,
roll and pitch values from the PID controller are zero. and it shows that the Fuzzy logic controller that combines
From this moment on, only safe landing algorithm is acti- both speed and position control strategy covers the IGE
vated in this mode. efficiently according to the designed rule base. Moreover,
Fig. 10 shows the flowchart of the proposed target de- fuzzy logic landing controller provides steady state land-
tection and safe landing algorithm. The first flow chart ing velocity which makes the landing process smooth and
is for the target detection and safe landing. During this safe.
process, LIDAR sensor keeps on measuring the altitude
of the quadcopter and RPi calculates the required throttle
values for a safe landing. Simultaneously, target detection 6. EXPERIMENTS
algorithm works continuously until the target is detected
at the altitude of 1 m (Scenario 1). When the quadcopter
is under 1 m, the Fuzzy logic based safe landing algorithm To verify the performance of the proposed target detec-
is triggered. During this process, roll and pitch values are tion and safe landing algorithm, several experiments were
zero (Scenario 2). performed indoor and outdoor. The experimental system
The second flowchart shows the data packet processing is composed of quadcopter frame with flight controller and
inside of the flight controller. Whenever the flight con- RPi controller which executes target detection and safe
troller receives the data packet, it will check whether the landing. Even though the RPi is not powerful enough for
target is detected or not by checking the flag. If the target real-time target detection and safe landing, we tried to use
is detected, it will send commands to quadcopter to start the RPi owing to its low cost.
stabilizing the quadcopter and safe landing. Furthermore,
two emergency switches on the RC transmitter are pro-
vided to support the safe operation of the quadcopter. One 6.1. Target detection algorithm
is for the manual trigger of target detection, and the other To perform the target detection, USB camera with a res-
is for the manual trigger of a safe landing. olution of 160 × 120 is used for guaranteeing the proper
execution time that will not affect the performance of the
5. SIMULATION STUDIES whole quadcopter system. Fig. 13 shows a top view and a
side view of the quadcopter system.
MATLAB/SIMULINK is used to test the proposed safe
landing algorithm based on fuzzy logic to overcome the As it is shown in Fig. 13, a USB camera and a gimbal
ground effect. The used simulation system is available on are connected to the RPi. Gimbal is used to make the cam-
MATLAB file exchange and it is free to use. The purpose era facing the ground while the quadcopter is maneuver-
of this system is to study the behavior of a quadcopter. A ing. Generally, the quadcopter can come to the vicinity of
GUI is provided to show real moments of quadcopter in the ground target with the help of GPS information. When
3D space. The full system is shown in Fig. 11(a). the quadcopter is hovering in the vicinity of the target at
As mentioned before, the output of Fuzzy logic con- an altitude of about 2.5 m or higher, the camera starts to
troller can be multiplied by a gain value to tune the best re- keep on taking snapshots continuously. Each snapshot is
sponse from fuzzy logic. Equation (5) describes the fuzzy processed by image processing algorithm to calculate the
logic output calculation by COG technique. centroid of the detected target inside of the frame image.
Fig. 14 shows the sequential results of the vision-based
∑ni=1 µi µ (i) target detection algorithm.
Throttleadj = K( ) (5)
∑ni=1 µ (i)
As it is indicated in Fig. 14, the captured RGB image is
where Throttleadj is the Fuzzy logic output value, K is the converted into HSV image. After applying the threshold-
throttle adjustment gain, i is the input number, µi is the ing technique to the HSV image, an image can be obtained
corresponding membership value, µ is the fuzzy input, with lots of black spots inside of the detected target. In
and n is the total number of inputs. order to remove these spots, the morphological transfor-
Fig. 12(a) shows the Fuzzy logic safe landing controller mation is used. Finally, it is possible to calculate the cen-
response at different gain values, while Fig. 12(b) shows troid of the detected target. If the centroids of the detected
the landing velocity response at different gains. As shown target are available, this information is given to the PID
in Fig. 12(a), higher gain value improves the response controller to calculate the required roll and pitch angle for
time. However, when the gain is very high, it will disturb stabilizing the quadcopter.
3020 Mohammed Rabah, Ali Rohan, Muhammad Talha, Kang-Hyun Nam, and Sung Ho Kim
(a)
(b)
Fig. 11. (a) Quadcopter simulation system. (b) Attitude command block.
6.2. Generation of a lookup table for the fuzzy logic logic controller. Additionally, the Simulink model is uti-
controller lized as shown in Fig. 15 to pre-calculate the output of
Generally, the Fuzzy logic controller is a complicated con- Fuzzy logic controller corresponding to different input
troller that takes long computation time. In the current ap- values.
plication, RPI is responsible for performing two tasks at Landing velocity signal is made ranging from −0.7 to
the same time. Especially, image processing takes a large 0.5 m/s using signal builder block, and output throttle ad-
execution time due to its huge data size. Therefore, im- justment values are saved for 0-250 cm altitude, with a
plementing Fuzzy logic controller in parallel with image 5cm difference. The simulation program is executed for
processing will cause processing delay which can cause all landing velocity inputs at each altitude point and out-
catastrophe. To overcome this problem, a pre-calculated put of the Fuzzy logic controller is recorded. For example,
lookup table method is used instead of a real-time Fuzzy altitude input of quadcopter is fixed to 250 cm and land-
Autonomous Vision-based Target Detection and Safe Landing for UAV 3021
(a)
(a)
(b)
Fig. 12. (a) Fuzzy logic landing controller gain tuning. (b)
Landing velocity response for fuzzy logic landing
controller at different gains.
Table 3. PID gains for roll control. Table 4. Target detection response time.
X P I D PID Indoor (sec) Outdoor (sec)
PID1 3.5 0.05 0.07 PID1 14.8 28.8
PID2 3.0 0.01 0.1 PID2 20.5 30.2
Autonomous Vision-based Target Detection and Safe Landing for UAV 3023
(a)
(a)
(b)
(b)
(c)
(a)
(d)
Table 5. The response time of the proposed algorithm. Fig. 18. Experimental results of fuzzy logic landing con-
troller (a) indoor, (b) outdoor.
Altitude Indoor (sec) Outdoor Pixhawk
(sec) (sec)
2.5 to 1 m 15 28 27
where the UAV can safely land after detecting target for
<1m 5 5.5 18
wireless charging then continue its task. In order to verify
Total time 20 33.5 45
the performance of the proposed algorithm, several exper-
iments are performed indoor and outdoor. The obtained
relatively cheap embedded controller was used for real- results show that the proposed system works well indoor
time applications such as target detection and safe landing. and outdoor for the target finding and safe landing of the
The proposed target detection and safe landing algorithm quadcopter. Furthermore, this system is currently being
can be used in many application such as mining detection, improved to safe land on a moving target.
3024 Mohammed Rabah, Ali Rohan, Muhammad Talha, Kang-Hyun Nam, and Sung Ho Kim
[1] G. M. Hoffmann, D. G. Rajnarayan, S. L. Waslander, D. [14] T. Muskardin, G. Balmer, S. Wlach, K. Kondak, M. La-
Dostal, J. S. Jang, and C. J. Tomlin, “The Stanford testbed iacker, and A. Ollero, “Landing of a fixed-wing uav on
of autonomous rotorcraft for multi agent control (STAR- a mobile ground vehicle,” IEEE Int. Conf. Robot. Autom.
MAC),” Proc. of the 23rd Digital Avionics System Confer- (ICRA), pp. 1237-1242, May 2016.
ence, vol. 2, pp. 12-E, 2004. [15] J. Gleason, A. V. Nefian, X. Bouyssounousse, T. Fong, and
[2] ICAO, “Unmanned aircraft systems (UAS) circular: UAS G. Bebis, “Vehicle detection from aerial imagery,” Proc. of
328,” Cir 328 AN/190. IEEE International Conference on Robotics and Automa-
tion, pp. 2065-2070, 2011.
[3] J. Stafford, How a Quadcopter Works | Clay Allen, Univer-
sity of Alaska, Fairbanks, Retrieved 2015-01-20, Spring [16] A. Gaszczak, T. P. Breckon, and J. Han, “Real-time peo-
2014. ple and vehicle detection from UAV imagery,” Intelligent
Robots and Computer Vision XXVIII: Algorithms and Tech-
[4] M. Bhaskaranand and J. D. Gibson, “Low-complexity niques, vol. 7878, International Society for Optics and Pho-
video encoding for UAV reconnaissance and surveillance,” tonics, 2011.
Proc. of the IEEE Military Communications Conference,
pp. 1633-1638, 2011. [17] F. Arifin, R. Arifandi Daniel, and D. Widiyanto, “Au-
tonomous detection and tracking of an object au-
[5] P. Doherty and P. Rudol, “A UAV search and rescue sce- tonomously using AR. drone quadrotor,” Journal of Com-
nario with human body detection and geolocalization,” puter Science and Information, vol. 7, no. 1, pp. 11-17,
Australasian Joint Conference on Artificial Intelligence, 2014.
pp. 1-13, 2007.
[18] K. Boudjit and C. Larbes, “Detection and target tracking
[6] T. Tomic, K. Schmid, P. Lutz, A. Domel, M. Kassecker, with a quadrotor using fuzzy logic. In Modelling,” Proc.
E. Mair, I. L. Grixa, F. Ruess, M. Suppa, and D. Burschka, of the 8th International Conference of Identification and
“Toward a fullyautonomous UAV: research platform for in- Control, pp. 127-132, 2015.
door and outdoor urbansearch and rescue,” Robotics & Au-
tomation Magazine, IEEE, vol. 19, no. 3, pp. 46-56, 2012. [19] T. G. Wilson and P. H. Trickey, “D. C. Machine. With solid
state commutation,” Electrical Engineering, vol. 81, no.
[7] L. Merino, F. Caballero, J. R. Martinez-de Dios, J. Fer- 11, pp.879-884.
ruz, and A. Ollero, “A cooperative perception system for
[20] A. Radhakrishnan, “An experimental investigation of
multiple UAVs: application to automatic detection of for-
ground effect on a quad tilt-rotor in hover and low-velocity
est fires,” Journal of Field Robotics, vol. 23, no. 3.4, pp.
forward flight,” Ph.D. Thesis, University of Maryland, Col-
165-184, 2006.
lege Park, 2006.
[8] J. Liu, C. Wu, Z. Wang, and L. Wu, “Reliable filter design
[21] M. Barr. Introduction to Closed-Loop Control, Embedded
for sensor networks using type-2 fuzzy framework,” IEEE
Systems Programming, CRC Press, 2012.
Trans. Ind. Electron, vol. 13, no. 4, pp. 1742-1752, Aug.
2017. [22] S. Bouabdallah, “Design and control of quadrotors with ap-
plication to autonomous flying,” Ph.D Thesis, Ecole Poly-
[9] S. Lange, N. Sunderhauf, and P. Protzel, “A vision based
technique Federale de Lausanne, pp.129-136, 2007.
onboard approach for landing and position control of
an autonomous multirotor UAV in GPS-denied environ- [23] H. An, J. Liu, C. Wang, and L. Wu, “Disturbance observer-
ments,” Proc. of the International Conference on Advanced based antiwindup control for air-breathing hypersonic ve-
Robotics, pp. 1-6, 2009. hicles,” IEEE Transactions on Industrial Electronics, vol.
63, no. 5, pp. 3038-3049, 2016.
[10] T. Vladimir, D.-H. Kim, Y.-G. Ha, and D. Jeon, “Fast
multi-line detection and tracking with CUDA for vision- [24] B. Yingcai and D. Haibin, “Implementation of autonomous
based UAV autopilot,” Proc. of the 8th International Con- visual tracking and landing for a low-cost quadrotor,” Inter-
ference on Innovative Mobile and Internet Services in national Journal for Light and Electron Optics, vol. 124,
Ubiquitous Computing, pp. 96-101, 2014. no. 18, pp.3296-3300, September 2013.
Autonomous Vision-based Target Detection and Safe Landing for UAV 3025
(a)
(b)
Fig. 20. Photos taken during practical test (a) indoor, (b) outdoor.
[25] L. X. Wang and J. M. Mendel, “Fuzzy basis functions, uni- Muhammad Talha received his B.S. de-
versal approximation, and orthogonal least-squares learn- gree in Electrical Engineering from The
ing,” IEEE Transaction on Neural Networks, vol. 3, no. 5, University of Faisalabad in 2012, an M.S.
pp. 807-814, 1992. degree in Control System Engineering
[26] Y. Bai and D. Wang, “Fundamentals of fuzzy logic con- from Kunsan National University in 2015,
trol - fuzzy sets, fuzzy rules and defuzzification,” Advanced and a Ph.D. degree in Electrical, Electron-
Fuzzy Logic Technologies in Industrial Applications, pp. ics and Control Engineering from Kunsan
17-36, 2006. National University in 2018. His research
interests include renewable energy sys-
tems, power converters, UAV’s, fuzzy logic.
Mohammed Rabah received his B.S de-
gree in Electronics and Telecommunica- Kang-Hyun Nam is a professor at Kunsan
tion Engineering from the AL-SAFWA National University working in collabora-
High Institute of Engineering, Cairo, tion with the Industry-University Coopera-
Egypt in 2015. He completed his MS in tion. His research interests include sensor
Electrical, Electronics and Control Engi- networks, IoT platform, big data, intelli-
neering from Kunsan National University, gent networking system, 5G slice service
Kunsan, Korea in Dec. 2017. Currently, logic.
pursuing his Ph.D. in Electrical, Electron-
ics and Control Engineering from Kunsan National University,
Korea. His research interests includes UAV’s, fuzzy logic sys-
tems and machine learning. Sung-Ho Kim received his B.S. degree in
Electrical Engineering from Korea Univer-
sity in 1984, an M.S. degree from Korea
Ali Rohan received his B.S. degree in University in 1986, and a Ph.D. degree
Electrical Engineering from The Univer- from Korea University in 1991. He com-
sity of Faisalabad, Pakistan in 2012. Cur- pleted POST-DOC from Hiroshima Uni-
rently, pursuing his MS & Ph.D. in Elec- versity (Japan). Current, he is a profes-
trical, Electronics and Control Engineer- sor at Kunsan National University. His re-
ing from Kunsan National University, Ko- search interests include wind turbine sys-
rea. His research interests includes re- tem, sensor networks, neural network and fuzzy logic, intelligent
newable energy system, power electronics, control systems.
fuzzy logic, neural network, EV system,
flywheel energy storage system.