Mac 2018
Mac 2018
Mechatronics
journal homepage: www.elsevier.com/locate/mechatronics
A R T I C L E I N F O A B S T R A C T
Keywords: This paper presents an autonomous methodology for a low-cost commercial AR.Drone 2.0 in partly unknown
Unmanned aerial vehicles (UAVs) indoor flight using only on-board visual and internal sensing. Novelty lies in: (i) the development of a position-
Sensor fusion estimation method using sensor fusion in a structured environment. This localization method presents how to get
Autonomous navigation the UAV localization states (position and orientation), through a sensor fusion scheme, dealing with data pro-
Optimal control
vided by an optical sensor and an inertial measurement unit (IMU). Such a data fusion scheme takes also in to
Multi-objective particle swarm optimization
account the time delay present in the camera signal due to the communication protocols; (ii) improved potential
field method which is capable of performing obstacle avoiding in an unknown environment and solving the non-
reachable goal problem; and (iii) the design and implementation of an optimal proportional - integral - derivative
(PID) controller based on a novel multi-objective particle swarm optimization with an accelerated update
methodology tracking such reference trajectories, thus characterizing a cascade controller. Experimental results
validate the effectiveness of the proposed approach.
☆
This paper was recommended for publication by Associate Editor Dr. Lei Zuo.
⁎
Corresponding author.
E-mail addresses: Thoa.MacThi@ugent.be (T.T. Mac), Cosmin.Copot@uantwerpen.be (C. Copot), Robain.Dekeyser@ugent.be (R.D. Keyser),
ClaraMihaela.Ionescu@ugent.be (C.M. Ionescu).
https://doi.org/10.1016/j.mechatronics.2017.11.014
Received 18 August 2017; Received in revised form 8 November 2017; Accepted 29 November 2017
0957-4158/ © 2017 Elsevier Ltd. All rights reserved.
T.T. Mac et al. Mechatronics 49 (2018) 187–196
conventional potential field method in which not only the position of It is worth mentioning that the coordinate system described above
the UAV (as in the traditional PFM) but also the relative angles between (x; y; z), represents a relative coordinate system used by the internal
the goal and obstacles are taken into account. However, this approach controllers (low layer). Using such a coordinate system instead of ab-
sometimes encounters problems when the repulsion from obstacles solute coordinates (e.g., X; Y; Z) in the high layer will yield errors. For
exceeds the physical constraints of the UAV. It is pointed out that the example, notice that by rotating the quadrotor, the relative coordinates
potential field method has several inherent limitations [15] in which (x; y) will change with respect to the absolute coordinates, as depicted
the non-reachable target problem is the most serious one and is worth in Fig. 1 (Right). In which, the rotation angular of XY coordinate
investigating since it causes an incomplete path in the navigation task. system respect to the absolute xy coordinate system is γ. It is possible to
As an UAV is a complex system in which electromechanical dy- state that the relation between the two-coordinate system depends di-
namics is involved, the robust controller is an essential requirement. In rectly of this angle.
[16], the dynamical characteristics of a quadrotor are analyzed to de- The IMU provides the software with pitch, roll and yaw angle
sign a controller which aims to regulate the posture (position and or- measurements. Communication between Ar.Drone and a command
ientation) of the quadrotor. An autonomous control problem of a station is performed via Wi-Fi connection within a 50 m range.
quadrotor UAV in GPS-denied unknown environments is studied AR.Drone 2.0 is equipped with two cameras in the bottom and in frontal
[17,18]. In order to obtain reasonable dynamical performance, guar- parts with the resolutions of 320 × 240 pixels at 30 frames per second
antee security and sustainable utilization of equipment and plants, (fps) and 640 × 360 pixels at 60 fps, respectively.
controller performance has to be constantly optimal.
In the current study, a real-time implementation for an AR. Drone
2.0 UAV autonomous navigation in indoor environment is proposed to 2.2. Analysis of inputs and outputs and system identification
trigger its identification, able to estimate the UAV pose, detect ob-
stacles, generate the suitable path and to perform the parametric op- The developed Software Development Kit (SDK) mode allows the
timization of its optimal proportional-integral-derivative (PID) con- quadrotor to transmit and receive the information roll angle (rad), pitch
troller. The main contributions are the development of: (i) a position- angle (rad), the altitude (m), yaw angle (rad) and the linear velocities
estimation method based on sensor fusion using only on-board visual on longitudinal/transversal axes (m/s). They are denoted by {θout, ϕout,
and inertial sensing considering the time delay of the camera signal and ζout, ψout, ẋ, ẏ } respectively. The system is executed by four inputs {Vinx,
reducing drift errors; (ii) a solution to solve the non-reachable target Viny, ζ˙in, ψ̇in } which are the linear velocities on longitudinal/ transversal
problem in conventional PFM; (iii) multi-objective optimization PID axes, vertical speed and yaw angular speed references as depicted in
controller based on a proposed multi-objective particle swarm optimi- Fig. 2.
zation (MOPSO) with an accelerated update methodology to execute An Ar. Drone is a multi-variable and naturally unstable system.
navigation task. The motivation behind this research is to illustrate that However, due to the internal low layer control implemented in the
autonomous navigation is feasible on low-cost UAV devices. embedded operative system, it is considered as a Linear Time Invariant
This paper is structured as follows: the next section gives a de- (LTI) System, which is able to be decomposed into multiple single input
scription of AR.Drone 2.0, identification, system setup and localization. single output (SISO) loops. Transfer functions are obtained via para-
Section 3 discusses UAV path planning based on improved potential metric identification using the prediction error method (PEM) and
field method. Multi-objective particle swarm optimization algorithm for Pseudo-Random Binary Signal (PRBS) input signals [19]. A sampling
control parameters optimization and simulation results are described in time of 5 ms for yaw and 66 ms for other degrees of freedom are chosen
detail in Section 4. Next, the effectiveness of the proposed real-time based on the analysis of dynamics characteristic. The identified transfer
collision-free path planning for an AR. Drone 2.0 UAV using only on- functions are given in Eq. (1).
board visual and inertial sensing application in indoor environment is Validation of transfer function of pitch/roll, altitude and yaw are
presented in Section 5. The final section summarizes the main outcome presented in Fig. 3. The validation of the transfer function is made
of this contribution and presents the next challenges. against a different set of data to prove that quadrotor movements are
approximated appropriately.
2. System setup, identification and localization
x (s ) 7.27
Hx (s ) = =
Vinx (s ) s (1.05 s + 1)
A description of the Ar.Drone 2.0 main characteristics, system
identification, sensory equipment, system setup and localization are y (s ) 7.27
Hy (s ) = =
presented in this section. Viny (s ) s (1.0fs + 1)
ζ (s ) 0.72
Haltitude (s ) = out =
2.1. Ar.Drone 2.0 description and coordinates system ζ˙ (s )
in
s (0.23 s + 1)
ψ (s ) 2.94
Hyaw (s ) = out =
There are four basic motions of this UAV: pitch, roll, throttle, yaw ψ˙ in (s ) s (0.031 s + 1) (1)
and translational movements over x, y and z, as shown in Fig. 1 (Left).
Fig. 1. The movements of an AR.Drone 2.0 in absolute and relative planes (Left) and UAV
displacement on (x; y) plane respect to the absolute plane (Right). Fig. 2. Inputs and Outputs of an AR.Drone 2.0.
188
T.T. Mac et al. Mechatronics 49 (2018) 187–196
Fig. 4. Optical sensor and IMU for localization of the Ar.Drone 2.0.
Fig. 3. Validation of pitch/roll (a), altitude (b), yaw (c) transfer function of an AR.Drone
2.0.
189
T.T. Mac et al. Mechatronics 49 (2018) 187–196
tan (roll) The proposed method in this paper considers both unknown and
offsetx =
x known obstacles, where the known obstacles are predefined from the
image width/2 beginning. This information could be extracted from the provided map
tan (FOV /2) =
x or from previous flights through that environment. Unknown obstacles
2*tan (roll)*tan (FOV /2) become only visible upon detection, which may force the algorithm to
offsetx =
image width
2*tan (pitch)*tan (FOV /2)
offsety =
imageheight (4)
The image processing algorithm is depicted in flowchart as shown in
Fig. 8 in which the input image is converted into gray image, then
applied a suitable threshold to find the contours. This threshold de-
pends on the light condition and therefore has to be appropriately
chosen.
In this work, the proposed solution to achieve a reliable position
estimation consists of combining the information from the two sensors.
In order to reduce the drift effect and noise, IMU is used to read the
variations and the optical sensor is used to find an offset-free mea-
surement. The simplest and functional combination consists of using the
optical sensor only when the standard deviation of the last five samples Fig. 9. Position values in an open loop obtained from the image processing-optical sensor
obtained from odometry is bigger than a tolerance value. The first step (green), the IMU-odometry (blue) and the fused response (red). (For interpretation of the
is to synchronise the two signals (video and speeds) as is shown in the references to colour in this figure legend, the reader is referred to the web version of this
article.)
Fig. 4b.
190
T.T. Mac et al. Mechatronics 49 (2018) 187–196
adjust the previous trajectory. The corners on the obstacle are marked Fig. 12. The problem and the solution when the agent, obstacle and target are aligned in
by colored (blue) patterns in order to distinct them from the rest of the which the obstacle in the middle and the attractive force approximates the repulsive
force. Left: the non-reachable target problem of conventional PFM, Right: Avoid local
room as it can be seen in Fig. 10. The orientations of the triangles also
minima solving the target non-reachable problem of MPFM.
provide information the obstacle’s geometry. The obstacle and its lo-
cation can still be detected when is only partially visible to the frontal
camera. In order to estimate the distance to the obstacle, the size of the goal. As a consequence, it is necessary to introduce the relative distance
triangles in the image can be used. The larger they appear, the closer between the agent and the target (d(q, qgoal)) into the formula of re-
they are and vice-versa. pulsive potential. Furthermore, since the agent is unable to stop sud-
denly at the target position while it is moving at a high speed, the agent
velocity term (q̇ ) is taken into account in the proposed attractive po-
3. Path planning based on improved potential field method tential formula. The total potential U = Uatt + Urep obtains the global
minimum (0) if and only if q = qgoal and q̇ = 0 . The MPFM are for-
Path planning is defined as designing a collision-free path in a mulated as follows:
working environment with obstacles. A path is a set of configuration → q
= {q0, q1, ... , qgoal} ∈ R n of the agent that connects the starting po- U = Uatt + Urep
sition q0 and the final position qgoal. Uatt (q, q˙) = ρp d 2 (q, qgoal) + ρv q˙ 2
Although the conventional PFM generates an effective path, it suf- ⎧1 ⎛ 1 1⎞ β
2
fers from the non-reachable target problem. This problem occurs when ⎪ α⎜ − ⎟ d (q , qgoal ) if d (q , qobs ) ≤ d 0
Urep = 2 ⎝ d (q, qobs ) d0 ⎠
the target is close to obstacles. In that case, when the agent approaches ⎨
⎪0 if d (q, qobs ) > d 0
the target, it approaches the obstacles as well. As a consequence, the ⎩ (6)
attractive force reduces while the repulsive force increases. Therefore, where ρp, ρv, α, β are positive coefficients; d0 is the affected distance of
the agent is trapped in local minima and oscillations might occur. obstacle; d(q, qgoal) is the distance between the agent and the target; d(q,
Fig. 11 (Left) presents the case that there are several obstacles lo- qobs) is the minimum distance between the agent and the obstacles.
cated near the target.The repulsive force is considerably larger than the The attractive force and repulsive force are the negative gradients of
attractive force, therefore the agent is repulsed away rather than attractive potential and repulsive potential as follows:
reaching the target.
F = Fatt + Frep
Fig. 12 (Left) illustrates another case in which the attractive field
and the repulsive field are co-linear in opposite directions and the total Fatt = − 2ρp d (q, qgoal ) − 2ρv q˙
force approximates zero thus the agent is trapped in local minima. Frep1 + Frep2 if d (q, qobs ) ≤ d 0
Frep = ⎧
⎨
⎩ 0 if d (q, qobs ) > d 0
3.1. Proposed attractive and repulsive potential β
1 1 ⎞ d (q, qgoal )
Frep1 = − α ⎛⎜ − ⎟
191
T.T. Mac et al. Mechatronics 49 (2018) 187–196
Fig. 15. Proposed MPFM under the complex partial known environment, Left: The agent
collides black (unknown) obstacle. Right: The agent re-plans the path according to
perceived environment.
J1 (X ) = SSE
J2 (X ) = OS
J3 (X ) = Ts − Tr (12)
where X is a set of parameters to be optimized, X = (Kp, Ki, Kd).
The block diagram of MPSO-based PID controller approach is pre-
Fig. 14. Proposed MPFM under the complex environment.
sented in Fig. 16. In this procedure, the dimension of the particle is 3.
192
T.T. Mac et al. Mechatronics 49 (2018) 187–196
Initialize parameters: The time (iteration) counter is set to 0, initial values r ∈ (0 1), c0 ∈ [0.1 0.5], c2 ∈ [0.1 0.7]
J (X ) = β1 J1 (X ) + β2 J2 (X ) + β3 J3 (X ) (13)
where β1, β2 and β3 are positive constants; J1(X), J2(X) and J3(X) are the
while {maximum iterations or minimum error criteria is not attained} do
their controllers have the same topology and parameters. Fig. 17 show
the results of X(Y) position control using Frtool [21], PID tuner Matlab
toolbox and the proposed MOPSO. The optimal Kp, Ki, Kd parameter sets
Update the iteration: t = t+1
Jbest = J(Xi )
steady state error, extremely short rise time and setting time.
Update Gb:
Gb = Xi ;
The results of the proposed approach (blue solid curves, name PSO-
end while
PID) are compared with the PID using Frtool (green dash-dot curves)
and PID tuner Matlab toolbox (red dot curves). Both PSO-PID and PID-
Frtool have better performances than the third one with no overshoot.
However, the setting time is clearly less for the proposed MPSO-PID
controller than for PID-Frtool and PID tuner.
In order to investigate the robustness and sensitivity of the approach
in changing of the weighted constants, the parameters β1, β2 , β3 are
modified in the range of 20% those values. Therefore, the composite
objective optimization is as following:
J (X ) = (β1 ± Δβ1) J1 (X ) + (β2 ± Δβ2) J2 (X ) + (β3 ± Δβ3) J3 (X ) (14)
where:
193
T.T. Mac et al. Mechatronics 49 (2018) 187–196
Fig. 17. X(Y) position step response with MPSO tuning, Frtool, PID tuner.
Table 1
Optimal control parameter selected by pso algorithm for AR. Drone 2.0 PID controllers.
• Path error: the distance between the drone and the designed path at
a time during flight.
• ⎯Target
⎯⎯⎯⎯⎯⎯⎯⎯⎯→
WP : the vector from Previous way-point to the Next way-point
•
⎯⎯⎯⎯⎯⎯⎯⎯→
Target
pathline as the vector towards the perpendicular path
194
T.T. Mac et al. Mechatronics 49 (2018) 187–196
drone detects the real obstacle in actual environment, that one is dis-
played in the virtual environment as black box. The MPFM is generates
the path in order taking account the ArDrone 2.0 dimension. The start
point, the target and the dimensions of the working space are also
shown in the virtual environment.
The results obtained with pattern-based localization, MPFM and
optimal PID control in the real system are presented in Fig. 22. The
bounded rectangle presents the walls of indoor working environment.
The red obstacles are known obstacles and the yellow one is unknown
obstacle. In the beginning, MPFM generate the black trajectory which
collides with unknown (yellow) obstacle since the drone only avoid red
obstacles. However, it updates the path immediately (local path-blue
Fig. 20. Compensation strategy for the quadrotor. path) as soon as its detecting a new (yellow) obstacle as shown in
Fig. 22. The green path is the real path obtained by experiment. It is
possible to observe that the quadrotor has few deviations to the desired
trajectory, with an acceptable overshoot at the moment of performing
sharp bends.
6. Conclusions
Acknowledgment
All authors from Ghent University are with EEDT group, member of
Flanders Make consortium.
References
[1] Woods AC, La HM. A novel potential field controller for use on aerial robots. IEEE
Trans Syst Man Cybern Syst 2017;99:1–12.
[2] Hernandez A, Murcia H, Copot C, De Keyser R. Towards the development of a smart
Fig. 22. Real-time obstacle avoidance of the AR. Drone 2.0 with pattern-based localiza- flying sensor: illustration in the field of precision agriculture. Sensors (Basel)
tion, MPFM and optimal PID controller. 2015;15(7):16688–709.
[3] Hernandez A, Copot C, Cerquera J, Murcia H, De Keyser R. Formation control of
UGVs using an UAV as remote vision sensor. Proceedings of the 19th IFAC World
⎯⎯⎯⎯→ ⎯⎯⎯⎯⎯⎯⎯⎯⎯→ ⎯⎯⎯⎯⎯⎯⎯⎯⎯→
Tar = λ * TargetWP + (1 − λ )* Targetpathline (15) Congress, Cape Town, South Africa. 2014. p. 618–23.
[4] Dijkshoorn N. Simultaneous localization and mapping with the AR.drone.
University of Amsterdam; 2012. Master’s thesis.
where λ is defined parameter as following: [5] Dullerud G. Modeling, identification and control of a quad-rotor drone using low-
resolution sensing. Champaign, IL, USA: University of Illinois at Urbana-
1 − (L/ L0)n if L < L0
λ=⎧ Champaign; 2012. Master’s thesis.
⎨ [6] Bouffard P. On-board model predictive control of a quadrotor helicopter: Design,
⎩0 if L > L0
implementation, and experiments. Berkeley, CA, USA: University of California;
⎯⎯⎯⎯→ 2012. Master’s thesis.
It is important to notice that the Tar should not significantly change [7] Ritz R, Muller M, Hehn M, D’Andrea R. Cooperative quadrocopter ball throwing and
when the drone is around the trajectory with a small Path error and catching. Proceedings of the IEEE/RSJ International Conference on Intelligent
should quickly react with a large Path error. For our system, n = 4 and Robots and Systems (IROS), Portugal, Algarve. 2012. p. 4972–8.
[8] Alvarez H, Paz LM, Sturm J, Cremers D. Collision avoidance for quadrotors with a
L0 = 0.5 m has been chosen. monocular camera. Exp Rob Springer Trans Adv Rob 2015;109:195–209.
In this work, a virtual environment is developed in order to monitor [9] Mac TT, Copot C, Tran DT, De Keyser R. Heuristic approaches in robot path plan-
on-line and facilitate off-line tests of the quadrotor navigation tasks as ning. A Surv Rob Auton Syst 2016;86:13–28.
[10] Malone N, Chiang H, Lesse K, Oishi M, Tapia L. Hybrid dynamic moving obstacle
presented in Fig. 21. In this figure, the comparison between the virtual avoidance using a stochastic reachable set-based potential field. IEEE Trans Rob
environment (Lelf) and actual environment (Right) is shown. When the
195
T.T. Mac et al. Mechatronics 49 (2018) 187–196
196