Custom Non-Linear Model Predictive Control for Obstacle Avoidance in Indoor and Outdoor Environments
Navigating complex environments requires Unmanned Aerial Vehicles (UAVs) and autonomous systems to perform trajectory tracking and obstacle avoidance in real-time. While many control strategies have effectively utilized linear approximations, addressing the non-linear dynamics of UAV, especially in obstacle-dense environments, remains a key challenge that requires further research. This paper introduces a Non-linear Model Predictive Control (NMPC) framework for the DJI Matrice 100, addressing these challenges by using a dynamic model and B-spline interpolation for smooth reference trajectories, ensuring minimal deviation while respecting safety constraints. The framework supports various trajectory types and employs a penalty-based cost function for control accuracy in tight maneuvers. The framework utilizes CasADi for efficient real-time optimization, enabling the UAV to maintain robust operation even under tight computational constraints. Simulation and real-world indoor and outdoor experiments demonstrated the NMPC ability to adapt to disturbances, resulting in smooth, collision-free navigation.
💡 Research Summary
The paper presents a comprehensive nonlinear model predictive control (NMPC) framework tailored for the DJI Matrice 100 quadrotor, targeting real‑time obstacle avoidance and precise trajectory tracking in both indoor and outdoor settings. Recognizing the limitations of linear MPC approaches—particularly their inability to capture the full nonlinear dynamics of larger UAVs—the authors retain the complete six‑degree‑of‑freedom (6‑DOF) dynamics in the predictive model. The state vector comprises positions, Euler angles, linear velocities, and yaw rate (10 states), while the control vector includes total thrust and reference roll, pitch, and yaw‑rate commands. Rotational dynamics are approximated by first‑order models derived from the internal DJI controller, allowing the NMPC to focus on the slower translational dynamics without sacrificing overall fidelity.
Reference trajectories are generated using B‑spline curves, which provide smooth, continuously differentiable paths that need not pass through every waypoint. This choice reduces the need for frequent re‑planning and ensures that the reference remains feasible for the NMPC optimizer. Obstacles are modeled as spheres with an added safety margin; a repulsive potential function is incorporated directly into the NMPC cost function, increasing sharply as the UAV approaches the safety boundary. This penalty‑based method avoids the computational overhead of hard constraints while still guaranteeing collision‑free behavior in practice.
The NMPC cost function penalizes state deviation, control effort, and control rate changes through weighting matrices Q, R, and ΔR. The authors tune these matrices differently for indoor (R = diag(0.2, 0.5, 0.5, 0.1)) and outdoor (R = diag(0.3, 0.6, 0.6, 0.2)) experiments to mitigate thrust and yaw oscillations and to compensate for wind disturbances. The optimization problem is formulated in Python using CasADi for symbolic differentiation and IPOPT as the nonlinear programming solver, with MUMPS/MA27 as the linear solver backend. This configuration yields average solver iteration counts of 2.1 (indoor) and 4.1 (outdoor) and convergence times below 0.03 s, meeting real‑time constraints.
Hardware implementation utilizes an Intel NUC i7‑7567U (3.5 GHz) with 16 GB RAM running Ubuntu 20.04 and ROS. Indoor tests employ a Vicon motion‑capture system for sub‑centimeter state feedback, while outdoor tests rely on GPS at Gränsö Island. Two primary flight scenarios are examined: a hexagonal B‑spline path without obstacles and a multi‑obstacle course. In simulation, the NMPC achieves average positional deviations of 0.21 m (hexagonal) and 1.01 m (obstacle) with maximum deviations under 3 m. Real‑world indoor flights confirm similar performance, and outdoor flights demonstrate robust operation under wind, with a modest 27 % increase in flight time when obstacles are present but no collisions.
Performance tables show that the control input range remains within safe limits (thrust ≈ 37 % indoor, 35‑40 % outdoor) and that the control loop update period varies between 11 ms and 33 ms depending on computational load. The authors also provide an open‑source repository and video documentation, facilitating reproducibility.
In summary, the work advances UAV control by integrating a full nonlinear dynamics model, computationally efficient NMPC solved with CasADi/IPOPT, smooth B‑spline trajectory representation, and a penalty‑based obstacle avoidance scheme. The experimental validation across diverse environments demonstrates that the proposed framework can deliver real‑time, collision‑free navigation for medium‑size quadrotors, offering a valuable reference for future research and practical deployments in complex, dynamic settings.
Comments & Academic Discussion
Loading comments...
Leave a Comment