Energies (Feb 2023)

Non-Linear Model Predictive Control Using CasADi Package for Trajectory Tracking of Quadrotor

  • Mohamed Elhesasy,
  • Tarek N. Dief,
  • Mohammed Atallah,
  • Mohamed Okasha,
  • Mohamed M. Kamra,
  • Shigeo Yoshida,
  • Mostafa A. Rushdi

DOI
https://doi.org/10.3390/en16052143
Journal volume & issue
Vol. 16, no. 5
p. 2143

Abstract

Read online

In this paper, we present the development of a non-linear model predictive controller for the trajectory tracking of a quadrotor using the CasADi optimization framework. The non-linear dynamic model of the quadrotor was derived using Newton–Euler equations, and the control algorithm and drone dynamics were wrapped in Matlab. The proposed controller was tested by simulating the tracking of a 3D helical reference trajectory, and its efficiency was evaluated in terms of numerical performance and tracking accuracy. The results showed that the proposed controller leads to faster computational times, approximately 20 times faster than the Matlab toolbox (nlmpc), and provides better tracking accuracy than both the Matlab toolbox and classical PID controller. The robustness of the proposed control algorithm was also tested and verified under model uncertainties and external disturbances, demonstrating its ability to effectively eliminate tracking errors.

Keywords