Abstract
In this study, the Genetic Algorithm operability is assigned to optimize the proportional–integral–derivative controller parameters for both simulation and real-time operation of quadcopter flight motion. The optimized proportional–integral–derivative gains, using Genetic Algorithm to minimum the fitness function via the integral of time multiplied by absolute error criterion, are then integrated to control the quadcopter flight motion. In addition, the proposed controller design is successfully implemented to the experimental real-time flight motion. The performance results are proven that the highly effective stability operation and the reliable of waypoint tracking.
Keywords
I. Introduction
Within the past few years, the high agility and autonomy of unmanned aerial vehicle (UAV) systems lead to application in different fields from civilian information including collecting traffic data, helping crash clear-up, inspecting bridges and meteorological observation to rescue operations or even military surveillance. Therefore, the fruitful achievement of such applications entails that the highest stability and precision of flight motion control must be maintain for a long-time operation. Consequently, the UAV pilot missions1–3 such as hovering, navigation, flight motion and obstacle avoidance are the vital functions.
Flight motion or flight path planning is one of the essential issues in flying aerial vehicles mission. It plays an important role in enhancing the autonomous flight and navigation capabilities of the UAV. Flight motion that is ultimately responsible for generation of a trajectory in space is designed for route testing. Since the UAVs are moving in three-dimensional (3D) space, the general motion is proposed by two motions, elevation or altitude and rectangular flight path motion, in this article.
Waypoints, which are usually used to definite the desired autonomous vehicle trajectory,3–8 are the sets of coordinates that identify serial points in physical space. At the present time, for the specific navigation activities such as radio beacons, buoyage, satellites and the control points, waypoints are more often allied with physical artifacts to create the path planning assignments.
The classical control methods such as proportional–integral–derivative (PID) controller1,2,9,10 are typically selected because it is simple and show high reliability in the practical applications. Nevertheless, it is normally difficult to select or optimize the control parameters. The purpose of this study is to investigate an intelligent algorithm to control the UAV missions.
Genetic Algorithm (GA), which inspired by natural evolution, was proposed by Holland in 1975. 11 GA is a heuristic global optimization search technique. A wide range of significantly complex real-world problems have been successfully applied8,11,12 by GAs. Each GA operates on a population of artificial chromosomes. These strings, which are generally a binary, are in a finite alphabet. Each chromosome represents a solution to a problem and has the fitness as a real number that measure how good of a solution to the particular problem. The best bit patterns are gradually selected during the GA course. The minimum/maximum value of the fitness function is then optimized.
Minimizing “the integral of time multiplied by absolute error” (ITAE) is commonly referred to a good performance index method, 9 especially on the digital systems. Based on the error calculation criterion, it can be easily applied to different models such as fitness function and system performance.
By minimizing the ITAE fitness function, the proposed GA-optimized PID controller is implemented in this article. Hence, the control issues and trajectory planning could be solved in a simple step to achieve the complete operations of the autonomous UAV. Consequently, the quadcopter operates smoothly, under a variety of constraints and uncertainties.
II. Quadcopter in Structure Description
The ordinary coordinate frame East, North, Up (ENU) global system of the inertial frame is verified in many applications of motion planning and waypoint tracking. The “East” direction goes along with x-axis. The “North” direction is the same as y-axis. Finally, z-axis coincides to “Up.”1–3 Based on Newton–Euler mathematical formulation, the quadcopter has four symmetric rotorcrafts in each couple as shown in Figure 1 .1–3,13–16 Similar to the conventional helicopter, quadcopter is presented with 6 degrees of freedom (DOFs) and displayed compactness and reliability as two major motivating benefits. Its two pairs of contra-rotating propellers (1 and 3 and 2 and 4) provide lift and directional control. By changing the four propeller’s speeds simultaneously, the vertical motion is generated. Varying the speed of propellers 2 and 4 conversely produces roll rotation, while varying the speed of propellers 1 and 4 produces pitch rotation. The performance from the difference in the counter-torque between each pair of propellers makes the yaw rotation more subtle.

Quadcopter structure in 3D coordinate frame.
III. Waypoint Tracking and Fly Motion Planning
A. Waypoint tracking
The waypoints that the users use more easily to observe the vehicle location help to define invisible routing paths for advanced navigational systems: the Global Positioning System (GPS).13,14,16–19 The autopilot controllers tune autonomous flight waypoint tracking in preparation for advanced navigation research. A track inside the flight test range is generated by the waypoints that are built in list
In this study, a motion planning “rectangular moving strategy” has been chosen to keep in track of quadcopter progress. It refers to survey longitude, latitude and altitude coordinate.
B. Line of sight
The line of sight (LOS), in the guidance and navigation concepts, is the straight line between the launcher and the target. The “fly within LOS” means that the aircraft must be kept in view at all times throughout flight. It should not fly behind obstacles or at distances that make the vision is impossible. At the end of the engagement, the distance will be zero.
C. Flight motion
On purpose of surveillance mission, the flight motion is planning and introducing as the reference set points and waypoints of flying motion control. In this project, the real-time flight motion planning has six waypoints, as shown in Figure 2 . The home (H) or take-off (T) on the ground (0 m) is the first one, the UAV will elevate at the height (Z = 10 m) and stability is the second waypoint and then the quadcopter will follow from the second waypoint to the sixth waypoint to draw the rectangular path planning.

Fly motion planning in 2D—top view with 6 waypoints.
IV. The Controller Design
In this section, the genetic intelligent algorithm, which is reliable and robust for searching solution spaces, is applied in three PID controller parameters to maneuver the quadcopter. Based on the minimum of the objective function, it can automatically find the optimal or near-optimal control gains which make the system performance closer to the expectation. In the PID controller structure, the I (integral gain), P (proportional gain) and D (derivative gain) are denoted by KI, KP and KD, respectively. The criterion, which is, namely, ITAE, emphasizes the overshoot and the adjusting time, which reflects the rapidity and the accuracy of the control system. Hence, it is chosen to estimate the system response. Its performance index is scientifically given by
The GA-optimized process is demonstrated as follows: 9
Set multi-objective function f(x) = KI ·1/e + KP·e + KD·de, x = {KI, KP, KD}
Encode the solution into chromosomes’ binary strings
Identify fitness function Jmin (ITAE)
Create the initial population
Initial probabilities of crossover (Pc) and mutation (Pm)
While (N < Max number of generations)
Produce new solution by crossover and mutation
If Pc > rand, Crossover and If Pm > rand, Mutate; end if
If their fitness toward zero, accept the new solutions
Pick up the best current for new generation (elitism process)
End while
Decode the results and visualization.
The whole GA-PID control process is shown in Figure 3 .

The proposed controller diagram.
V. Simulation Results
The quadcopter flight motion has been simulated with MATLAB platform. Its parameters are measured from the real quadcopter model and shown in Table 1 . In order to analyze the performance of the proposed algorithm, simulations were run several times to obtain best value of algorithm’s parameters. The GA is implemented and run for 100 iterations. The GA’s crossover rate is pc = 0.85 and mutation rate pm = 0.15. The PID inputs KI, KP and KD are set in range ϵ [0,30]. The PID gains, after tuning, are recorded in Table 2 .
Quadcopter parameters.
Controller design gains.
ZA: Ziegler–Nichols; GA: Genetic Algorithm.
The waypoints in advanced navigational systems (GPS), which are used to identify invisible routing paths for easily monitoring position, are pointed in significant nodes around the flying paths.
The compared controller strategies are investigated, the first is PID controller using the classical Ziegler–Nichols method and the second is GA-optimized PID gain controller. The numerical simulation results of two motions, elevator or altitude control and flight path planning motion control, are displayed in Figures 4 and 5 , respectively. The motion following trajectory is proved by the node of waypoints. The trajectory tracking results indicate obviously that the proposed controller has achieved the best flight performance.

Elevation motion in simulation: (a) elevator–altitude control and (b) GA fitness function.

Flight motion in simulation results: (a) before optimizing controller gains, (b) after optimizing controller gains and (c) GA fitness function.
The simulation flight motion is set up on two segments: elevator and stability at Z = 10 m, as shown in Figure 4 , and the rectangular path planning in range [50, 100] meter, as illustrated in Figure 5 .
VI. Experiment Setup
The operated quadcopter is powered by a 14.8 V, 2200-mAh Li-Po rechargeable battery. It has four DC brushless motors and the runtime is about 15 min. The quadcopter module communication includes IEEE 802.11 wireless with 2.4-GHz frequency which is widely used today. Quadcopter operations have two modes, manual and automation, to control pilot systems via remote control and firmware such as landing, take-off, roll, pitch, yaw and adjust vertical velocity. The maneuver test is finished after calibration of the quadcopter as shown in Figure 6 . The simulation parameters then refer to apply to real-time maneuver. The waypoint tracking is assigned according to the Google Maps and GPS signal and the operation warning that it must be on the view of the “LOS” ( Figure 7 ).

Quadcopter in real-time test bed: (a) set up and (b) operation mode.

Real-time flight motion and waypoint tracking.
The real-time flight motion planning has six waypoints: home (H) or take-off (T) on the ground (0 m) is the first one, the UAV will elevate at the height (Z = 10 m) and is stable at the second waypoint and then the quadcopter will follow from second waypoint to sixth waypoint to draw the rectangular path planning. This experiment was conducted at the soccer yard of Ho Chi Minh City University of Technology, Vietnam. The real-time error tracking between target path and practical path is measured approximately 1 m, which means that the intelligent controller design has 1% of error in the steady wind 5 km/h.
VII. Conclusion
This study has fruitfully developed the quadcopter flight motion control to the standard motion: rectangular path planning, both in numerical simulation and real-time operation. First, the PID controller performed well in the assessment of the following waypoint tracking and flight motion. We then successfully applied the GA-optimized PID via ITAE criteria for the quadcopter flight motion control system. The proposed controller, GA tuned PID, illustrated superior and the highest accurate tracking trajectory overwhelming the standard PID. As a result, the operation time is also improved.
Our future works are adding the disturbance to attack the system model like the big wind and pilot it throughout the obstacle avoidance.
Footnotes
Funding
This research was supported by National Key Lab for Digital Control & System Engineering (DCSELAB), HCMUT, VNU-HCM.
Conflict of interest
The author(s) declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.
