本論文主要探討以 Matlab/Simulink 所設計的控制律,直接燒錄到 Pixhawk 後,其控制效能為何,目的在於降低實務化複雜控制律的門檻。一般來說,控制器的設計,經過理論分析、挑選參數之後,會進行數值模擬。若數值模擬效果良好,則會進入硬體實現階段。對於非電機背景的研究人員而言,將設計的控制器在硬體上實現,是個很大的門檻。而 Matlab/Simulink 可將設計好的控制模組,直接燒錄至 Pixhawk 中,對於較複雜的控制律實現,有莫大助益。 具體來說,本研究採用 PID 控制器來控制無人飛行載具,並透過 Matlab/Simulink 燒錄至 Pixhawk 的功能來實現並驗證本論文的設計成果。本研究首先針對市售的 Skysurfer 無人機進行建模,再使用 Datcom+ 軟體與相關理論,求出其動力學導係數。之後根據所求出的動力學模型與參數,應用 Ziegler Nichols 經驗法則挑選 PID 控制所需的參數值,並完成數值模擬,及搭配 X-plane 軟體進行軟體在環測試。本研究接著將設計好的 Simulink 模塊組直接燒錄至 Pixhawk,安裝至 Skysurfer 實機試飛。試飛結果顯示所設計的控制器完全能夠發揮作用。因此,本研究成果,對於較複雜的控制律實現,有效降低所需的技術門檻。
This thesis studies the effectiveness of control laws implemented in Pixhwak collaborated with Matlab/Simulink. The objective and potential contribution are to lower down the threshold of implementing a sophisticated control law. When developing a controller, one usually follow the procedure of controller design, parameters selection, and numerical simulations. Given good performance validated by numerical simulations, the design will be implemented in a hardware. For a researcher with non-electronic engineering background, implementation is quite challenging. The function of burning a Simulink model into Pixhawk did help a lot. In specific, in this research a PID controller is designed to control an unmanned aerial vehicle (UAV), and implemented and validated by directly burning the controller built in Matlab/Simulink into Pixhawk. We first establish the dynamics model of the Skysurfer, a commercial UAV, and identify all the parameters by theories or datcom+ software. Then derivatives for dynamic model are derived. Given dynamic model and parameters, PID controllers with associated parameters for attitude control are designed by applying the Ziegler-Nichols rule. Numerical simulations and software-in-the-loop in the X-plane simulator are conducted as well. The controller, designed and simulated in Matlab/Simulink, is then burned to Pixhawk directly, which later on was installed in the Skysurfer for flight tests. The flight tests have validated the effectiveness of our control law. As a result, our work presented in this thesis potentially contributes to lower down the threshold of implementing sophisticated control laws in the future.