## 1 Introduction  
Small UAVs(unmanned aerial vehicles) have a limitation in their payload, and can carry only a small computer. This means that heavy and complex computation is difficult to operate on a UAV's on-board computer. With limited computation power, it is difficult to prevent collisions caused by the sudden appearance of obstacles in front of the small UAV during an autonomous flight [1]. A UAV has to replan the global trajectory in order to fly in an unmapped and cluttered environment. In this paper, we present an efficient method of replanning the quadrotor's global trajectory for safe flight. Thanks to the differential flatness property [2], the quadrotor's desired motor speed and state can be represented as a 3D coordinate and orientation of a quadrotor. If the quadrotor has the trajectory, it can compute the desired motor speed and state from the differential flatness. Iteration-based optimization methods are widely used for generating global trajectory, such as the unconstrained Quadratic Programming (QP) method [3], which shows a fast computation speed and provides a collision-free trajectory using a visibility graph [4]. The global trajectory is computed before the quadrotor's flight using the previously mapped environment to generate the global trajectory. When a quadrotor faces an obstacle, it needs to replan its global trajectory. There are advanced techniques for replanning to prevent collision and ensure successful safe flight. In the reactive method [5], the quadrotor does not build any map during the flight [6, 7]. It depends on a camera sensor attached on the front of the robot. When an object is detected in the camera by the detection or classifying algorithm, the replanning algorithm commands the robot to move to the right or left rather than continuing straight. This method is high-speed, but when too many objects are detected, such replanning algorithms tend to fail. Sampling-based methods such as RRT (rapidly exploring random tree) [8] build a road map from sampling free space and searches the graph map space by computing the edge cost and heuristic functions [9]. However, the RRT path is non-smooth in general, and it often does not satisfy the quadrotor's dynamic constraint. The smoothing step is necessary to ensure kinematic and dynamic feasibility [3]. This method builds a visibility graph to construct a non-smooth path, but it takes too much time to execute in real-time on an on-board computer. Another method is the trajectory optimization method, which uses two kinds of cost function to make a collision-free path [10]. One is a smoothing function, and the other is a collision avoidance function [11]. To minimize the sum of the cost function, researchers have used optimizations such as gradient-descent methods [12] or Gauss-Newton, by computing the gradient or Jacobian of each cost function. By setting proper constraints on polynomials (e.g., velocity and kinematic constraints), the trajectory can satisfy dynamic feasibility. This method can generate a non-collision trajectory in a cluttered environment. Optimization needs to find the best solution for the whole function, but a local minimum smaller than the neighboring values does not guarantee the optimal solution for the whole function [13]. When local minima occur, the trajectory hits an obstacle or induces infeasible movement, causing a dangerous situation for humans and robots. In this work, we address an analytical method to guarantee a safe trajectory. The analytical method is free from local minima problems, which means a safe replanning trajectory can be generated. The proposed method is also much faster than numerical methods because it can omit the iteration process [14]. Therefore, a quadrotor can fly faster, as an on-board computer can compute solutions in real-time. Moreover, we combine all systems (e.g., localization, mapping, control, and vision) for quadrotor autonomous flight [15].