This repository contains MATLAB implementations for multi-agent drone swarm control with obstacle avoidance capabilities and dynamic formation control. The codebase implements various control strategies for drone swarms operating in environments with static and moving obstacles.
- 🔄 Dynamic formation control using Voronoi tessellation
- 🧭 3D path planning with obstacle avoidance
- 🚧 Collision avoidance between agents
- 🏙️ Building/wall constraint handling
- 📊 Visualization tools for drone trajectories and Voronoi diagrams
- 🛡️ Multiple obstacle detection and avoidance strategies
The repository is organized into three case studies, each exploring different aspects of multi-agent control:
- Basic drone formation control without obstacle avoidance
- Voronoi-based centroid calculation for optimal coverage
- Building/wall constraint handling
- Formation control with static and moving obstacles
- Enhanced collision avoidance between agents
- Sensor field-of-view (FOV) based obstacle detection
- Full 3D control for drone swarms
- Advanced obstacle avoidance using potential fields
- Spherical obstacle representation and avoidance
Centroid_Calculator.m
- Computes optimal agent positions using Voronoi tessellationdynamics_*.m
- Main simulation files for different scenariosTransMat.m
- Coordinate transformation between reference framesDyn.m
- Dynamic model of drone agentsdistance.m
- Distance calculation between agents/obstacles
The implementation is based on several key algorithms:
- Lloyd's algorithm for Voronoi-based coverage control
- Artificial potential fields for obstacle avoidance
- Consensus-based flocking control
- Proportional-derivative (PD) controllers for formation maintenance
- MATLAB R2020b or newer
- MATLAB Robotics Toolbox (recommended)
- Clone this repository
- Open MATLAB and navigate to the repository folder
- Choose a case study folder and run the corresponding
dynamics_*.m
file - Visualize the results using the generated plots
Example:
cd 'CASE STUDY 2'
dynamics_multiobs
The code includes visualization tools to display:
- 3D trajectories of all agents
- Voronoi diagrams of agent distribution
- Obstacle positions and avoidance maneuvers
- Relative distances between agents (for collision avoidance verification)
This project is licensed under the MIT License - see the LICENSE file for details.