因四軸飛行器體積小、動作靈活且可在空中移動等因素,在各個領域被廣泛研究,如利用四軸飛行器搬運重物、編隊飛行,也因為能夠靈活改變移動,所以如何對其進行控制是很重要的問題。 本研究主要在說明如何設計控制器、姿態估測、控制四軸飛行器的四個馬達的轉速,改變四軸飛行器的roll、pitch、yaw角度,使四軸飛行器可以定位、追蹤路徑,到達各個地點。 本研究先從四軸飛行器的基本原理開始介紹,建立動態模型,設計姿態估測器,再設計閉迴路控制器使四軸飛行器的四個馬達可補償姿態誤差,使其能完成定位、循跡追蹤。飛行姿態控制的方法為利用IMU (Inertial Measuring Unit)偵測四軸飛行器現在的三軸加速度和角速度,再透過Mahony 演算法、Madgwick 演算法等其他方式,去除雜訊的影響,得到可靠的roll、pitch、yaw角度。 姿態控制完成之後,就設計控制器使四軸飛行器在空間中定位、產生路徑並追蹤,能使四軸飛行器在指定時間經過特定地點且加速度的2次微分(snap)變化為最小。利用RRT(rapidly exploring random tree)的方法產生從起點到目標點的連線,配合路徑生成的方式,可找出一條由起點到目標點且適合四軸飛行器飛行的路徑。
Due to factors such as small size, flexible movement and fly in the air, quadcopters have been widely studied in various fields, for example, use quadcopters to carry heavy loads, formation flight. Also because its flexible movement, how to control it is an important issue. This study mainly explains how to design the controller, attitude estimator, control the rotational speed of the four motors of the quadcopter. Change the roll, pitch and yaw angle of the quadcopter, so that the quadcopter can locate and track the path, finally reach any position. This study begins with the basic principle of the quadcopter, establishes a dynamic model, designs the attitude estimator, and then designs the closed loop controller so that the four motors of the quadcopter can compensate for the attitude error, let it complete the positioning and tracking. The flight attitude control method uses the IMU (Inertial Measuring Unit) to detect the current 3-axis acceleration and angular velocity of the quadcopter, and then removes the influence of noise through the Mahony algorithm, Madgwick algorithm and other methods to obtain a reliable roll. pitch, and yaw angle. After completing the attitude control, designed the controller to let the quadcopter locate in space, generate a smooth path, enabling the quadcopter to track and pass through a particular location at a specified time and the second derivative of acceleration is minimized. RRT (rapidly exploring random tree) method is used to generate the connection from the starting point to the goal point. With the way of path generation, a path from the starting point to the goal point and suitable for the flight of the quadcopter can be found.