# Ellipsoidal Path Planning for Unmanned Aerial Vehicles
## 4 Simulation and Results  
To define the whole path, TLBO was run several times, and each time (except the first one) the learners were initialized randomly within the proximity of \(\tau_{t-1}\); for the first iteration the \((x,y,z,yaw,pitch,roll)\) base values where defined arbitrarily. Each TLBO run consisted of 20 iterations and a population of five individuals; \(r_{1}\) and \(r_{2}\) were assigned values of 0.35 and 1.5, respectably. As a stopping condition, the Euclidean distance from \(\tau_{t}\) and the target \(\theta\) was used (a distance value less than 0.1). At the end of a run, \(\tau_{t}\) is added to the path. As Figure 7 shows.  
The values that could be achieved by a learner were bounded, so that the drone could not make abrupt changes that could make it behave unstably from one state to another or fly at very pronounced angles. In each iteration, the values of the learners were bounded by \(\tau_{t-1}\pm(0.5,0.5,0.5,0.15,0.15,0.25)\). The drone's \((yaw,pitch,roll)\) values were also bounded globally to \(\pm[\pi,0.7,0.7]\) radians, respectively. The bounds and other valueswere empirically selected. We included the pitch and roll angles in the search space because some control schemes for UAV such as Backstepping or Inverse Optimal Control need these references [23; 24; 25]. However, our proposal can work even when ignoring pitch and roll angles.  
Compared to [9], our approach involving the path planning algorithm offers several advantages. Firstly, our approach was designed to work indoors and outdoors alike. Ref. [9] shows several limitations avoiding large convex obstacles inside a room since it does not take them into consideration and this prevents the algorithm to be trapped in certain local minimums. The influence of the obstacles in our approach also only takes into account the nearest obstacles in the range and adds smaller penalty values that do not heavily obfuscate the influence of the distance to a target in the fitness function.  
Figures 8-12 show several maps where paths were generated for a drone to follow. All the maps were contained in a room composed of ellipsoids. The room was not plotted for display purposes.  
Figure 10: Path of map 2 without the room of ellipsoids. In this case, the ellipsoids, where the map is contained, have been removed. As can be seen, now the UAV can easily find a path above and beside the obstacles.  
Figure 9: Path of map 2 generated with TLBO. The green ellipsoids represent the drone path and the multicolor ellipsoids represent the obstacles. Although it shows difficulties to find a path, it is safely pushed away the obstacles at the start.  
The figures display the path followed by the drone (green ellipsoids) to its target (red asterisk), avoiding on the way several obstacles (multicolor ellipsoids). As can be seen, the drone can easily follow the paths obtained by the algorithm. Maps, like those shown in Figures 8 and 9, show little difficulty finding a path; even in the presence of convex obstacles at the start, the drone is safely pushed away until it finds a way to circumnavigate the obstacles. Comparing Figures 9 and 10 it can be seen that, without the room, the path simply passes above and beside the obstacles.  
Figure 11: Path of map 3 generated with TLBO. The path represented by the green ellipsoids, are sufficiently smooth for the UAV.  
Figure 12: Path of map 4 generated with TLBO. The algorithm bounds a smooth path in presence of convex obstacles.