# Real-Time Terrain-Following of an Autonomous Quadrotor by Multi-Sensor Fusion and Control
## 1 Introduction  
In recent years, advances in constructions, electronics, sensors and control algorithms have fueled a growth in the development of unmanned aerial vehicles (UAVs) [1]. The automatic applications of UAVs rely on the continuous control of the position, attitude, speed and other high level commands [2, 3]. Specifically, the attitude and height (the clearance from the ground) controllers allow terrain-following of an autonomous quadrotor, which is useful for topography prediction, navigation and obstacle avoidance [4, 5, 6]. An integrated navigation framework is an autonomous system used for determining the position, attitude and velocity of UAVs using multi-sensors [7, 8], i.e., a global positioning system (GPS), an inertial measurement unit ((IMU) e.g., an accelerometer, a gyroscope and a magnetometer) [9] and radar or distance sensors [10, 11, 12, 13]. To achieve a more reliable travel in real environments, fruitful research efforts have focused on the height control problem [14]. The height control of common UAVs applies a proportional-integral-derivative (PID) control structure for the altitude that handles high impact and changed mass [15, 16, 17]. These controllers compare the behavior of the UAVs with a model and adapt the output of the controller to minimize the error between the model and the system. The design, implementation, simulation and evaluation of this controller will be presented in this paper divided into algorithms based on a classic control theory and a modern controltheory. Control algorithms based on a modern control theory include a dynamic inverse control [18], a linear-quadratic regulator (LQR) control [19], an intelligent control (such as a neural network control [20; 21]) and an adaptive control [22; 23]. [PERSON] used the dynamic inversion based adaptive control method to control the height of the UAVs in the climbing stage and verified that the method had good effects through simulation [24]. However, the long-term flight of UAVs is a time-varying nonlinear system [25; 26] whose external environment, speed, load and other parameters change continuously. For dynamic inverse control strategies, the control effect is often not satisfactory because there is no effective method to obtain the precise parameters of the model. Due to the requirement of the rapidity of response, the intelligent control algorithm, which needs complex calculations, is less used in practical engineering applications though it has a strong environmental adaptability [16]. Thus, in engineering practice, methods based on a classic control (such as the PID control) are mostly used because of the uncertainty of system parameters and the requirement of real-time control. The PID control is an effective and reliable flight control strategy that has been studied for some time and has a mature design strategy. For the UAVs' terrain-following system, the problem to be solved is that the traditional single-stage PID control cannot meet the requirements in terms of response speed and stability [27]. In order to improve the quality of control, [PERSON] used the cascade PID control method to control the UAVs and verified the efficiency of the cascade PID controlled UAVs in tracking slopes, circles and sinusoidal trajectories through a simulation [28]. [PERSON] analyzed the system based on the classical control theory and proved that the cascade PID was better than the traditional single-stage PID control from an amplitude margin and a phase angle margin [29]. A cascade PID is one of the effective methods used to improve the quality of traditional PID control and it has been widely used in the field of process control [30; 31; 32]. For the cascade PID control of terrain-following UAVs, how to set the control feedback state quantity and how to adjust its parameters are important issues. The Ziegler-Nichols method [33], the critical proportionality method [34] and the attenuation curve method [35] are commonly used in engineering for tuning.