Nonlinear Model Predictive Controller for Target Tracking

Photo by Dev Soni

NMPC Implementation 🕹ī¸

👉 For simple intiution Model predictive control uses the system model to do prediction of future states of system for some predicted optimal inputs in prediction horizon, and applys only one input and does the same process again to compansate the unmeasured noise or disturbance in system.
👉 In this instance our system is unmaned arieal vehicle and it’s following the target which is mobile vehicle.
👉 The cost function that sould be minimize for predicted inputs is made by the distance between UAV and target which is moving.
👉 This code uses the CasADi framework to code NMPC.

✨ “State predictive model of target” folder of repository has the targets model which feds for the UAV as reference(a moveing reference) and it gives the cost value from the initial point of UAV.
✨ “NMPC_TT” has the code of NMPC.

✈ī¸ UAV tracks the target illustration đŸ”Ĩ

📌 UAV without Gimbal

UAV Traking Target without Gimbal
UAV Traking Target without Gimbal
UAV Traking Target without Gimbal
UAV Traking Target without Gimbal

📌 UAV with 3-DoF Gimbal

Smooth Tracking with Gimbal
Smooth Tracking with Gimbal
Smooth Tracking with Gimbal
Smooth Tracking with Gimbal
Smooth Tracking with Gimbal
Smooth Tracking with Gimbal

đŸĸ🏗ī¸ Without Obstacle Avoidance

Without Obstacle Avoidance (UAV is Colliding with Obstacles)
Without Obstacle Avoidance (UAV is Colliding with Obstacles)

đŸĸ🏗ī¸ With Obstacle Avoidance

With Obstacle Avoidance (Avoiding Collusion with Obstacles)
With Obstacle Avoidance (Avoiding Collusion with Obstacles)
With Obstacle Avoidance (Avoiding Collusion with Obstacles)
With Obstacle Avoidance (Avoiding Collusion with Obstacles)

🔗 This code is source code of this paper 📝

NMPC-based UAV 3D Target Tracking In The Presence Of Obstacles and Visibility Constraints