## 1 Introduction
Likewise, in [11], a fuzzy logic algorithm was used to determine the optimal controller coefficients of a high order sliding mode controller for a quadcopter trajectory tracking control in the presence of uncertainties. More recently, a robust full tracking control design of disturbed quadrotor UAVs with unknown dynamics based on type-2-adaptive fuzzy systems are presented in [12]. Particularly, fuzzy logic has been used in a landing path selection problem for an aircraft carrier in [13]; the fuzzy path selection strategy was proposed, considering the fuzziness of environmental information and human judgment, with the goal of providing the pilot with a more reasonable set of choices. Thus, a neural network algorithm has been widely used in the synthesis of controllers for quadcopter stabilization. A decentralized proportional-integral-derivative (PID) neural network control scheme is proposed in [14] to stabilize a quadrotor helicopter subjected to wind disturbance. The hierarchical structure was adopted in this study, where the inner-loop was designed using a neural network, while a conventional PID is used for the outer loop. Furthermore, in [15], the neural network method is combined with fuzzy logic to optimize the performance of a quadcopter. Owing to its maneuverability and its simplicity, the PID controller has been adopted in most of the literature for controlling a quadcopter. There exist various and widely used classical methods for adjusting a PID. However, these conventional approaches require a linear model of the controlled system for tuning the parameters. To overcome the limitations and drawbacks of linear approaches, a variety of nonlinear algorithms have been developed and applied to improve PID tuning, including optimization techniques. As an illustration, robust PID controllers tuned by particle swarm optimization for a hose transportation system performed by aerial robots was developed in [16]. In addition, in [17], an improved particle swarm optimization approach for identification and control of stable and unstable systems has been studied. Furthermore, a combination of the particle swarm optimization-based algorithm and the evolutionary programming algorithm was introduced in [18]. Moreover, in [19], a trajectory tracking control law optimization using a modified genetic algorithm (GA) for an autonomous aircraft vehicle was proposed. Additionally, genetic algorithm techniques were used in [20] to optimize PID controllers for a quadcopter attitude stabilization. On the basis of this literature, but differing in many ways, our work deals with the problem of trajectory tracking for quadcopters using two different approaches. In a hierarchical approach, the structure scheme is composed of an internal and external loop. The inner loop is synthesized to control the quadcopter attitude, while the outer loop is designed to stabilize the position motions. The two PD/PID controller blocks are optimized using GA and reference model (RM) techniques. The new second control strategy developed herein is based only on altitude and attitude control. The control of the other two positions (\(x\), \(y\)) results from their relationship with the pitch and roll movements of the quadcopter. Again, in the design of the different PDs/PIDs, the two methods (GA and RM) are compared. Thereafter, the performance of the two proposed methods are investigated not only taking into account the system nonlinearities but also the presence of wind disturbances. This paper is arranged as follows: in Section 2, the dynamic model of the quadcopter and the coupling expression between the translational motion equations and the rotational movements are presented. In Section 3, the proposed hierarchical controllers are described, starting with a controller synthesized using the RM approach, then using the GA optimization process. In Section 4, the new strategy of trajectory tracking via attitude stabilization is presented. Likewise, in the first controller, the PD/PID gains are synthesized by utilizing the RM and GA optimization.