Skip to content

Chapter 10: Swarm Collaboration and Game-Theoretic Adversarial Interactions

The concept of swarms originated from biological research. French zoologist Grasse, based on observations of termite nest-building behavior, first proposed the concept of stigmergy—a mechanism of intermittent coordination among individuals that enables complex intelligent activities without centralized planning or direct communication. This marked the beginning of the autonomous swarm concept entering human understanding and gradually developing. Extending from biological systems to Multi-Agent Systems (MAS), the concept of swarms has continued to evolve and enrich.


10.1 Background and Theory

Intelligent unmanned swarm systems represent a systemic integration and capability leap of the technologies discussed in previous chapters, signifying the advancement of intelligent unmanned systems to a higher level. Such systems must possess self-organization, self-adaptation, and fault-tolerance capabilities to flexibly execute diverse tasks—including cooperative formation, area coverage, target tracking, and game-theoretic adversarial interactions—in dynamic, even unstructured environments.

10.1.1 Swarm System Concept

The concept of a swarm initially emerged from biological research. Inspired by observations of termite nest-building behavior, the term stigmergy was first introduced, describing an indirect coordination mechanism among individuals that accomplishes complex intelligent tasks without centralized planning or direct communication.

alt text

10.1.2 Development of Swarm System Research

The evolution of swarm system research can be divided into three phases:
- Foundational theory and conceptual exploration phase (1990s to early 2000s),
- Practical application and platform development phase (mid-2000s to 2010s),
- Future-oriented and integrated innovation phase (2010s to present).


10.2 Framework and Interfaces

The RflySim toolchain provides robust support and a reusable paradigm for the development and application of intelligent unmanned swarm systems. It supports the swarm collaborative control architecture and interface usage, enabling a complete engineering workflow—from algorithm development and simulation validation to real-platform deployment.

alt text

10.2.1 Swarm Collaborative Control and Formation

RflySim supports one-click initiation of multi-aircraft swarm simulations, offering development environments for both MATLAB/Simulink and Python. It supports software-in-the-loop (SITL) and hardware-in-the-loop (HITL) simulations for multiple aircraft, as well as distributed swarm simulations across multiple computers within a local area network.

alt text

10.2.2 Intelligent Game-Theoretic and Adversarial Interactions

The toolchain enables intelligent unmanned swarms to flexibly perform diverse tasks—including cooperative formation, area coverage, target tracking, and game-theoretic adversarial interactions—in dynamic and even unstructured environments. Compared to single unmanned platforms, this significantly enhances overall reliability, task adaptability, and execution efficiency.

alt text


10.3 Showcase of Representative Cases

Large-scale Swarm Search and Target Localization Simulation:

Vertical Takeoff and Landing (VTOL) Aircraft Multi-Agent Formation:


10.4 Course-Linked Video Lectures

Public Lecture Replay (Session 8: Swarm Collaboration and Game-Theoretic Adversarial Interactions):

10.5 Chapter Experiment Cases

The relevant verification experiments and guided cases for this chapter are stored in the [Installation Directory]\RflySimAPIs\10.RflySimSwarm folder.

10.5.1 Interface Learning Experiments

Stored in the 10.RflySimSwarm\0.ApiExps folder, these experiments cover foundational platform interface tutorials and general introductions to various tools.

Experiment 1: Simulink Acceleration Mode Simulation Experiment for Four UAVs

📝 Experiment Overview:
This experiment uses the Simulink interface to control four UAVs to perform a formation flying simulation drawing a circle. By leveraging Simulink's acceleration mode, simulation efficiency is enhanced, addressing real-time performance and resource consumption issues associated with complex control algorithms, enabling rapid validation of multi-UAV control algorithms.

Experiment 2: Remote Pixhawk Flight Controller Hardware Reboot via UDP

📝 Experiment Overview:
This experiment demonstrates how to remotely reboot Pixhawk flight controller hardware via UDP broadcast, resolving issues such as failure to take off or abnormal flight behavior caused by disordered flight controller parameters in Hardware-in-the-Loop (HITL) simulations, thereby enabling re-initialization of HITL simulations.

Experiment 3: Multi-UAV Terrain Altitude Acquisition Interface

📝 Experiment Overview:
Using the terrain altitude acquisition interface of the RflySim platform, this experiment loads map data via LoadPngData, retrieves terrain altitude at specified coordinates via getTerrainAltData, and automatically configures initial positions for multiple aircraft. Taking 12 UAVs as an example, it demonstrates how to automatically compute terrain altitude information for initial UAV placement based on the current terrain.

Experiment 4: MATLAB-Based ROS2 Control Experiment

📝 Experiment Overview:
Through this experiment, students will master the integration of ROS2 with MATLAB, understand data transmission principles of the MAVLink protocol within the PX4-ROS2-MATLAB control chain, and learn how to build UAV ROS2 control nodes and flight control logic using Simulink, enabling hardware-in-the-loop simulation validation.

Experiment 5: Batch Launch and Co-Simulation of Multiple Vehicle Types

📝 Experiment Overview:
This experiment uses batch scripts to launch and co-simulate multiple vehicle types—including multirotors, ground vehicles, and fixed-wing aircraft—in parallel—validating the stability of multi-vehicle concurrent operation in the RflySim environment and enabling rapid setup of multi-agent scenarios.

Experiment 6: ROS 2 Multi-UAV Swarm Control

📝 Experiment Overview:
This experiment teaches communication between ROS 2 and the PX4 flight control system, and demonstrates how to achieve cooperative multi-UAV control using Python scripts. Students will master Offboard-mode position control and swarm formation flight techniques.

Experiment 7: MAVLink_Full Swarm Control Experiment

📝 Experiment Overview:
Using the MAVLink communication interface of the RflySim platform, this experiment controls the position, velocity, and heading of four UAVs. It introduces the UDP mode of MAVLink_Full communication and demonstrates coordinated swarm control of UAVs.

Experiment 8: RflySim Swarm RflyUdpFast Interface Experiment

📝 Experiment Overview:
This experiment utilizes the RflySim swarm Simulink-RflyUdpFast interface to control multiple UAVs in Offboard mode. Students will learn the FullData and SimpleData modes of UDP communication and methods for multi-UAV cooperative control.

Experiment 9: Four-UAV Point-Mass Model Swarm Experiment

📝 Experiment Overview: Implements quadcopter swarm simulation on the RflySim platform using Python point-mass models. By commanding 4 drones to take off, hover for several seconds, and then descend, this experiment verifies the swarm simulation capability of the simplified flight control model.

Experiment 10: Swarm RflyUdpRaw Interface Experiment

📝 Experiment Overview:
Controls 3 drones in Offboard mode by invoking the RflySim swarm Simulink-RflyUdpRaw interface. This experiment teaches IP configuration, UDP port setup, and MAVLink encoding methods for multi-drone swarm control.

Experiment 11: Fixed-Wing Point-Mass Model Swarm Experiment

📝 Experiment Overview:
Constructs a fixed-wing point-mass model to achieve precise control over velocity, yaw angle, altitude, and position commands, verifying trajectory tracking performance.

Experiment 12: RflySerialRaw Interface for Single Drone Offboard Control

📝 Experiment Overview:
Controls a single drone in Offboard mode via the RflySim swarm Simulink-RflySerialRaw interface. This experiment covers SerialRaw serial communication configuration and methods for issuing Offboard commands to multiple drones.

Experiment 13: RflyUdpMavlink Interface for Multi-Drone Offboard Control

📝 Experiment Overview:
Controls multiple drones in Offboard mode by invoking the RflySim swarm Simulink-RflyUdpMavlink interface. This experiment teaches the use of three control modes: position, velocity, and acceleration.

Experiment 14: RflySim Motion Capture VRPN Data Reception Interface Experiment

📝 Experiment Overview:
By invoking the RflySim swarm Simulink-RflyVrpnRecv interface, this experiment achieves real-time acquisition of six-degree-of-freedom information (position, velocity, acceleration, etc.) for objects such as drones in a motion capture environment. It configures the motion capture IP, drone IP, and port, and sends motion capture data to the flight controller for real flight control.

Experiment 15: High-Maneuverability Acceleration Control Experiment

📝 Experiment Overview:
This experiment implements drone Offboard mode control and high-maneuverability acceleration control via a Simulink model. Students will master the use of the mode switching module (None/Offboard/Arm/Takeoff/Flying/Land/Disarm) and verify the acceleration control interface.

10.5.2 Basic Usage Experiments

Stored in the 10.RflySimSwarm\1.BasicExps folder, these experiments provide a comprehensive set of supplementary teaching materials for beginners.

Experiment 1: MATLAB Control of UAV Simulation Experiment

📝 Experiment Overview:
Learn the Simulink communication interface modules of the RflySim toolchain—including FullData, SimpleData, RflyUdpRaw, RflySerialRaw, and RflyUdpMavlink modes—and practice communication control and simulation verification for single- and four-UAV systems.

Experiment 2: Swarm Light Show Demonstration

📝 Experiment Overview: Import multi-UAV trajectory data into RflySim 3D via Python scripts for 3D visualization preview, demonstrating lighting transformation effects. This is used to evaluate UAV formation flight performance and optimize flight paths.

Experiment 3: Quadrotor Point-Mass Model Swarm Experiment

📝 Experiment Overview: Implement takeoff and circular formation flight of 8 quadrotors using point-mass models on the RflySim platform. This validates the effectiveness of the hardware-in-the-loop (HIL) simulation method combining high-precision 6DOF models with real PX4 flight controllers.

Experiment 4: RflySim 3D Collision Interface Experiment

📝 Experiment Overview: Demonstrate collision effects for UAVs in the 3D engine via RflySim platform APIs, including single/multi-UAV collision detection, Simulink physics engine response, and P-mode communication optimization. This experiment focuses on learning collision detection and collision avoidance strategy design.

Experiment 5: Swarm Formation Control Simulation with Automatic Collision Avoidance

📝 Experiment Overview: Based on MATLAB/Simulink and the RflyUdpFast transmission module, implement 8-quadrotor figure-8 formation flight control with automatic collision avoidance, supporting 1–10 UAVs in formation.

Experiment 6: RflySim 3D Collision Detection API

📝 Experiment Overview: Demonstrate the usage of RflySim platform collision APIs, implementing UAV collision effects in the 3D engine via raycasting. This validates collision detection and response mechanisms, and evaluates flight safety.

Experiment 7: 8-UAV Point-Mass Model Swarm Simulation

📝 Experiment Overview: Implement takeoff and circular flight missions for 8 quadrotors using point-mass models on the RflySim platform. This validates the effectiveness of the hardware-in-the-loop (HIL) simulation method integrating high-precision 6DOF models (CopterSim) with real flight control systems (PX4).

Experiment 8: Single-UAV Control in RflyUdpFast FullData Mode

📝 Experiment Overview: Use the FullData mode of the RflyUdpFast transmission module to receive UAV state information, and implement local position motion control (circular trajectory) for a single UAV via Simulink modeling. This enables software-in-the-loop (SIL) or hardware-in-the-loop (HIL) simulation experiments.

Experiment 9: 8-UAV Figure-8 Formation Flight Control

📝 Experiment Overview: Implement figure-8 formation flight control for 8 quadrotors using MATLAB/Simulink and the RflyUdpFast module. This validates the effectiveness and stability of multi-UAV formation control algorithms.

Experiment 10: Vision-Based UAV Swarm Following Experiment

📝 Experiment Overview: Identify red circular targets via HSV color space segmentation, and implement visual servoing control for two- or four-UAV formations to follow a moving target using a proportional controller. This experiment focuses on learning and practicing vision-based formation control techniques.

Experiment 11: RflyUdpMavlink Real-Time Simulation

📝 Experiment Overview:
Utilize the RflyUdpMavlink library to implement MAVLink message transmission, reception, and parsing, and control UAVs via Simulink S-Functions for Software-in-the-Loop (SIL) and Hardware-in-the-Loop (HIL) simulations.

Experiment 12: RflyUdpMavlink Real UAV Control

📝 Experiment Overview:
Connect Simulink to real UAVs via the RflyUdpMavlink communication interface to implement safety self-checks and status monitoring. Supports both SIL and HIL modes for algorithm validation and flight controller performance testing.

Experiment 13: Dual-UAV Collision MAVLink API Experiment

📝 Experiment Overview:
Use the Python API to control two aircraft in RflySim 3D and simulate a collision process, evaluating collision detection accuracy, response mechanisms, and system performance.

Experiment 14: Four-UAV Simulation in RflyUdpFast FullData Mode

📝 Experiment Overview:
Use the FullData mode of the RflyUdpFast transmission module from the RflySim toolchain to build a Simulink model for centralized position control of quadrotor UAVs, validating control algorithm effectiveness and analyzing swarm coordination performance.

Experiment 15: RflySim UDP Mode Dual-UAV Collision Experiment

📝 Experiment Overview:
Simulate the process of two aircraft taking off and colliding via the Python API, evaluating the detection capability, response mechanism, and system performance of the RflySim 3D collision engine. Learn multi-UAV collision simulation methods under P0-P3 communication modes.

Experiment 16: Four-UAV Global Coordinate Control Experiment in RflyUdpFast FullData Mode

📝 Experiment Overview:
Learn to use the RflyUdpFast transmission module (FullData mode) from the RflySim toolchain Simulink library to receive state information from four UAVs, build a local position motion control model, and implement centralized coordinated control and trajectory tracking for a quadrotor UAV swarm.

Experiment 17: RflySim UDP Mode Dual-UAV Collision Simulink Experiment

📝 Experiment Overview:
Use MATLAB/Simulink to control two aircraft via UDP mode for collision simulation experiments, evaluating the collision detection, response mechanism, and system performance of RflySim 3D in collision engine mode.

Experiment 18: Single-UAV Circle Drawing Experiment in RflyUdpFast SimpleData Mode

📝 Experiment Overview:
Learn to use the SimpleData transmission module of the RflySim toolchain to receive UAV state information, implement single-UAV circular trajectory control via Simulink modeling, and master the parameter configuration of the RflyUdpFast module and software-in-the-loop/hardware-in-the-loop experimental methods.

Experiment 19: Four-UAV Simulation in RflyUdpFast SimpleData Mode

📝 Experiment Overview:
Learn to use the RflyUdpFast transmission module (SimpleData mode) of the RflySim toolchain to receive state information from quadrotor UAVs, implement single-UAV local position motion control via Simulink modeling, master the method of converting control commands into offboard signals for transmission to the flight controller, and conduct software/hardware-in-the-loop simulation experiments.

Experiment 20: Four-UAV Global Coordinate Control in SimpleData Mode

📝 Experiment Overview:
Implement centralized global coordinate control for a quadrotor UAV swarm using the SimpleData mode of the RflyUdpFast transmission module. The experiment includes building a Simulink control model, subscribing to localPos position data, generating velocity control commands by differencing with a circular desired trajectory, converting them into offboard signals via the SimpleCtrl4D module for transmission to the flight controller, and conducting software-in-the-loop or hardware-in-the-loop simulation experiments.

Experiment 21: UAV Control Experiment in FullDataModel Mode

📝 Experiment Overview:
Use the RflyUdpFast transmission module for software-in-the-loop/hardware-in-the-loop experiments. Subscribe to localPos position data output from the FullData bus, generate velocity control commands with a circular desired trajectory, and convert them into offboard mode signals via the vel_ned_full module to control UAV flight.

Experiment 22: Single-UAV Control in RflySerialRaw FullData Mode

📝 Experiment Overview:
Receive UAV state via the RflyUdpFast transmission module, and use Simulink to perform local position circular motion control simulation for a single UAV.

Experiment 23: Single-UAV Communication Experiment in RflyUdpMavlink FullData Mode

📝 Experiment Overview:
Use the Mavlink_simple mode of the RflyUdpMavlink library to receive and send MAVLink messages, achieving the same functionality as the UDP_simple mode of the RflyUdpFast module. This is used for single-UAV control and can run software-in-the-loop or hardware-in-the-loop simulations.

10.5.3 Advanced Development Experiments

Stored in the 10.RflySimSwarm\2.AdvExps folder, these experiments further familiarize users with certain low-level firmware ecosystem configurations.

Experiment 1: MATLAB Centralized Control of Eight-UAV Simulation

📝 Experiment Overview:
Control eight UAVs to perform circular formation flight using the SimpleData mode of the Simulink communication interface and the RflyUdpFast transmission module, mastering MATLAB/Simulink-based centralized swarm control methods.

Experiment 2: Distributed Local Area Network Communication for 8-UAV Simulation
  • 📦 Version Requirement: Free Edition
  • 📁 File Path: [e2.MatDISCtrlUAVsSim/Readme.pdf](../../px4psp/RflySimAPIs/10.RflySimSwarm/2.AdvEx
Experiment 1: Four-UAV Circle Drawing Simulation in Simulink Acceleration Mode

📝 Experiment Overview:
This experiment uses the Simulink interface to control four UAVs, leveraging acceleration mode to improve simulation speed and efficiency, thereby enabling rapid validation of multi-UAV cooperative flight performance and system design optimization.

Experiment 2: UDP Remote Reboot of Flight Controller Hardware Interface Experiment

📝 Experiment Overview:
This experiment demonstrates how to remotely reboot all Pixhawk flight controllers on a local area network via UDP broadcast, resolving issues such as failure to take off or abnormal flight behavior caused by disordered flight controller parameters after multiple HITL simulations, and teaching multi-flight-controller reboot techniques.

Experiment 3: Multi-UAV Terrain Altitude Acquisition Interface Experiment

📝 Experiment Overview:
This experiment validates the altitude information acquisition interface of the RflySim platform. By specifying the number of aircraft and spacing, it automatically configures initial positions and retrieves the current terrain altitude, using 12 aircraft as an example to detail the experimental steps.

Experiment 4: Flight Controller Network Port Hardware-in-the-Loop Communication Experiment

📝 Experiment Overview:
This experiment provides an entry point for flight controller network port communication experiments, guiding users through network port parameter configuration, flight controller network connection, and experiment environment initialization, preparing for swarm network port hardware-in-the-loop experiments.

Experiment 5: ROS2-MATLAB Integrated Control Experiment

📝 Experiment Overview:
Learn ROS2 and MATLAB integration techniques, master the application of the MAVLink protocol in the PX4-ROS2-MATLAB control chain, build UAV control nodes using Simulink, and achieve hardware-in-the-loop simulation validation.

Experiment 6: Batch Launch and Co-Simulation of Multiple Vehicle Types

📝 Experiment Overview:
Use batch scripts to launch and co-simulate multirotors, ground vehicles, and fixed-wing aircraft, configuring vehicle parameters, quantities, and initial positions. This validates the stability of multi-vehicle parallel operation and provides a platform for testing multi-agent collaborative control algorithms.

Experiment 7: ROS2-Based UAV Swarm Control Experiment

📝 Experiment Overview:
Through hands-on operation, learn the design and implementation of a ROS2-based UAV swarm control system, including ROS2-PX4 communication, Offboard mode control, multi-UAV cooperative formation flight, and WSL2 environment configuration.

Experiment 8: MAVLinkFull4Swarm Swarm Python Interface Demonstration Experiment

📝 Experiment Overview:
Using the RflySim platform's Python Mavlink communication interface, demonstrate position, velocity, and heading control for four UAVs. Master the MAVLink_Full UDP communication mode and the method of using multiple PX4MavCtrler instances to control multiple aircraft.

Experiment 9: RflySim Swarm RflyUdpFast Interface Experiment

📝 Experiment Overview:
Control multiple UAVs in Offboard mode by invoking the RflySim swarm Simulink-RflyUdpFast interface. Learn the FullData and SimpleData modes of UDP communication and methods for multi-UAV cooperative control.

Experiment 10: Four-UAV Point-Mass Model Swarm Experiment

📝 Experiment Overview:
Based on the RflySim platform's Python point-mass model, complete a swarm simulation of 4 quadrotors on a single computer. Understand the advantages of simplified flight control models in multi-UAV simulation and verify the complete control flow of takeoff, hover, and landing.

Experiment 11: RflySim Swarm Simulink-RflyUdpRaw Interface Experiment

📝 Experiment Overview:
Control three UAVs in Offboard mode by invoking the RflySim swarm Simulink-RflyUdpRaw interface. Learn multi-UAV control and MAVLink communication configuration.

Experiment 12: Fixed-Wing Point-Mass Model Swarm Experiment

📝 Experiment Overview:
Build a fixed-wing point-mass model and control speed, yaw angle, altitude, and position commands to make the fixed-wing UAV fly along a predetermined trajectory, validating and optimizing model performance and trajectory tracking capability.

Experiment 13: RflySerialRaw Interface Experiment

📝 Experiment Overview:
Achieve single-UAV and multi-UAV Offboard control flight through the RflySim swarm Simulink-RflySerialRaw interface, covering steps such as flight controller state restoration, hardware connection, and control command transmission.

Experiment 14: RflySim Swarm Simulink-RflyUdpMavlink Interface Experiment

📝 Experiment Overview:
Achieve single-UAV and multi-UAV Offboard mode control flight by invoking the RflySim swarm Simulink-RflyUdpMavlink interface. Learn the use of Mavlink communication and mode control modules.

Experiment 15: RflySim Swarm RflyVrpnRecv Interface Experiment

📝 Experiment Overview:
By invoking the RflySim swarm Simulink-RflyVrpnRecv interface, achieve real-time acquisition of position and attitude information for objects in a motion capture environment, covering steps such as motion capture environment preparation, pre-flight checks for UAVs, communication checks, and Simulink model execution.

Experiment 16: High-Maneuverability Acceleration Control

📝 Experiment Overview:
Control a UAV for high-maneuverability acceleration control using a Simulink model and module switching. Master acceleration command control in Offboard mode and flight phase switching mechanisms.

10.5.2 Basic Usage Experiments

Stored in the 10.RflySimSwarm\1.BasicExps folder, these experiments provide a comprehensive set of supplementary teaching materials for beginners.

Experiment 1: RflySim Swarm Communication Module Experiment

📝 Experiment Overview:
This is an RflySim Swarm communication module experiment based on MATLAB/Simulink, covering interfaces such as RflyUdpFast, RflyUdpRaw, RflySerialRaw, and RflyUdpMavlink. Through single-UAV, four-UAV, and real-flight bridging experiments, students will master the state reception, control modeling, and command transmission processes under different communication modes.

Experiment 2: Swarm Trajectory Light Show Experiment

📝 Experiment Overview:
This experiment aims to conduct detailed analysis and visualization of multi-UAV trajectory data in formation flight. By previewing the light show effect in the 3D engine, it evaluates flight performance and optimizes paths, improving formation flight accuracy and efficiency.

Experiment 3: Point-Mass Model Swarm Simulation Without PX4 Flight Controller

📝 Experiment Overview:
This experiment uses high-precision 6DOF models (CopterSim) and a real flight control system (PX4) for software/hardware-in-the-loop simulation. It implements takeoff and circular formation flight tasks for 8 point-mass-model quadrotors on the RflySim platform, validating the effectiveness of the simulation method combining high-precision models with real flight controllers.

Experiment 4: RflySim 3D Collision Interface Experiment

📝 Experiment Overview:
Demonstrates the implementation of UAV collision effects in the 3D engine via RflySim platform APIs, including single/multi-UAV collision detection, Simulink physics engine response, and P-mode communication optimization. Students will learn collision detection and anti-collision strategy design.

Experiment 5: 8-UAV Figure-8 Formation Flight Simulation Experiment

📝 Experiment Overview:
Based on MATLAB/Simulink and the RflyUdpFast module, this experiment implements figure-8 formation flight control for 8 quadrotor UAVs, supporting expansion to 1-10 aircraft and featuring automatic collision avoidance.

Experiment 6: RflySim 3D Collision Detection API

📝 Experiment Overview:
Demonstrates the usage of RflySim platform collision APIs, implementing UAV collision effects in the 3D engine via raycasting. This validates collision detection and response mechanisms and evaluates flight safety.

Experiment 7: 8-UAV Quadrotor Point-Mass Model Swarm Experiment

📝 Experiment Overview:
This experiment uses high-precision 6DOF models (CopterSim) and a real flight control system (PX4) for software/hardware-in-the-loop simulation on the RflySim platform, implementing takeoff and circular flight tasks for 8 quadrotor UAVs to validate the effectiveness of the simulation method combining high-precision models with real flight controllers.

Experiment 8: RflyUdpFast Single-UAV Simulink Control Experiment

📝 Experiment Overview:
Using the RflyUdpFast transmission module from the RflySim toolchain, this experiment builds a single-UAV local position motion control model in Simulink for software/hardware-in-the-loop simulation, and masters the FullData mode data protocol and parameter configuration.

Experiment 9: 8-UAV Figure-8 Formation Flight Control

📝 Experiment Overview:
This experiment implements figure-8 formation flight control for eight quadrotor UAVs using MATLAB/Simulink and the RflyUdpFast module, validating the effectiveness and stability of multi-UAV formation algorithms.

Experiment 10: UAV Swarm Visual Following Experiment

📝 Experiment Overview:
This experiment controls multiple UAVs to cooperatively track a moving red circular target, learning core skills in vision-based swarm autonomous following, including visual servoing control, HSV color segmentation, formation flight control, and PID controller design and tuning.

Experiment 11: RflyUdpMavlink Real-Time Simulation

📝 Experiment Overview:
Uses the RflyUdpMavlink library to implement MAVLink message transmission, reception, and parsing, and controls UAVs via Simulink S-Functions for software-in-the-loop and hardware-in-the-loop simulation experiments.

Experiment 12: RflyUdpMavlink Real UAV Control

📝 Experiment Overview:
Connects Simulink to real UAVs via the RflyUdpMavlink communication interface to implement safety self-checks and status monitoring. Supports both Software-in-the-Loop (SIL) and Hardware-in-the-Loop (HIL) modes for algorithm validation and flight controller performance testing.

Experiment 13: MAVLink Mode Dual-UAV Collision Experiment

📝 Experiment Overview:
Controls two aircraft in RflySim3D via Python scripts to fly and collide, evaluating collision detection and response mechanisms and learning P-mode communication optimization.

Experiment 14: RflyUdpFullFour Four-UAV Centralized Control Simulation

📝 Experiment Overview:
Uses the RflyUdpFast transmission module from the RflySim toolchain to receive state information from four UAVs in FullData mode, implements centralized local position motion control via Simulink modeling, and validates control algorithms, data transmission efficiency, and swarm behavior.

Experiment 15: RflySim3D Collision Engine Mode Evaluation

📝 Experiment Overview:
By simulating the entire collision process of two aircraft, this experiment evaluates the collision detection capability, response mechanism, and system performance of RflySim3D, and learns the collision engine signal transmission between CopterSim and RflySim3D as well as P0-P3 communication modes.

Experiment 16: RflyUdpFullFourGPos_Mat Four-UAV Global Coordinate Control Experiment

📝 Experiment Overview:
Uses the RflyUdpFast transmission module from the RflySim toolchain to receive state information from quadrotor UAVs in FullData mode, implements centralized control of four UAVs in global coordinates via Simulink modeling, and validates control algorithm effectiveness and swarm coordination performance.

Experiment 17: UDP Mode Dual-UAV Collision (Simulink) Experiment

📝 Experiment Overview:
Simulates the collision process of two aircraft via Simulink, evaluating the detection capability, response mechanism, and system performance of the RflySim3D collision engine, and learning P0-P3 collision modes and signal transmission principles.

Experiment 18: RflyUdpSimpleOne_Mat Single-UAV Circle Drawing Experiment

📝 Experiment Overview:
Uses the SimpleData transmission module from the RflySim toolchain to receive UAV state information, performs local position motion control modeling, and implements a single-UAV circular trajectory control experiment.

Experiment 19: Four-UAV Simulation Experiment in SimpleData Mode of the RflyUdpFast Communication Interface

📝 Experiment Overview:
This experiment builds a local position motion control model for quadrotor UAVs in Simulink using the RflyUdpFast transmission module from the RflySim toolchain, implements software-in-the-loop and hardware-in-the-loop simulations, and masters data reception and control command transmission in SimpleData mode.

Experiment 20: RflyUdpSimpleFourGPos_Mat Four-UAV Global Position Control Experiment

📝 Experiment Overview:
Implements centralized global position control for a quadrotor UAV swarm in Simulink using the SimpleData mode of the RflyUdpFast transmission module, understanding communication protocols and swarm control strategies.

Experiment 21: RflyUdpRawMavlink FullDataModel Mode Single-UAV Experiment

📝 Experiment Overview:
This experiment uses the RflyUdpFast transmission module to receive state information from a quadrotor UAV, implements circular trajectory tracking control via a Simulink model, and supports software-in-the-loop and hardware-in-the-loop simulations to validate control algorithm performance.

Experiment 22: RflySerialRawMavlink_Mat Single-UAV Experiment

📝 Experiment Overview:
Receives UAV state information via the RflyUdpFast transmission module, uses Simulink modeling for single-UAV local position motion control, and supports hardware-in-the-loop simulation.

Experiment 23: RflyUdpMavlink Communication Interface Control Experiment

📝 Experiment Overview:
Uses the RflyUdpMavlink library to implement MAVLink message reception and transmission, controls UAVs after parsing via S-Functions, supports software-in-the-loop and hardware-in-the-loop simulations, and teaches the MAVLink communication protocol and Offboard control mode.

10.5.3 Advanced Development Experiments

Stored in the 10.RflySimSwarm\2.AdvExps folder, these experiments further familiarize users with certain low-level firmware ecosystem configurations.

Experiment 1: MATLAB Centralized Swarm Control Experiment

📝 Experiment Overview:
Use MATLAB and the RflySim toolchain on a single computer to complete 8-UAV formation, trajectory tracking, and leader-follower cooperative control validation, mastering multi-UAV task allocation, trajectory generation, and formation maintenance methods under a centralized control framework.

Experiment 2: Distributed Local Area Network Communication 8-UAV Simulation Experiment

📝 Experiment Overview:
This experiment aims to address the issue of insufficient single-computer computing power by splitting simulation and control tasks across multiple computers via a local area network, mastering RflySim swarm simulation deployment and configuration methods under both broadcast and point-to-point communication modes.

Experiment 3: PX4 SITL and Point-Mass Model Hybrid Swarm Experiment

📝 Experiment Overview:
Through the RflySim platform, master the flight control methods for hybrid heterogeneous UAV swarms combining PX4 SITL and point-mass models, including MAVLink Offboard control, formation following, and NED coordinate system applications.

Experiment 4: Multicopter Light Show Swarm Simulation Without PX4

📝 Experiment Overview:
This experiment guides the deployment of a large-scale multicopter (non-PX4 firmware version/DLL dynamics model) light show swarm simulation based on RflySim on a single computer, achieving multi-UAV pure geometric array light shows.

Experiment 5: Quadrotor and Unmanned Ground Vehicle Heterogeneous Swarm Cooperative Control Routine

📝 Experiment Overview:
Through coordinated motion between quadrotor UAVs and unmanned ground vehicles, understand the control logic and communication mechanisms of multi-agent systems, mastering PX4 flight controller Offboard mode control and UDP communication simulation synchronization methods.

Experiment 6: Distributed Local Area Network Broadcast Communication 8-UAV Simulation Experiment

📝 Experiment Overview:
This experiment utilizes the RflySim platform's swarm simulation capabilities to jointly perform software-in-the-loop simulation of 8 UAVs flying in a circular formation across two computers on a local area network, learning the configuration and operation methods for distributed multi-UAV simulation.

Experiment 7: Multi-UAV Regional Defense Confrontation System

📝 Experiment Overview:
Through a simplified 3v3 UAV regional defense confrontation system, learn rule-based UAV behavior decision-making mechanisms, mastering the basic principles of UAV swarm control and RflySim simulation operations.

Experiment 8: RflyUdpUltraSimpleEight_Mat

📝 Experiment Overview:
Use the RflyUdpFast transmission module of the RflySim toolchain to build a centralized control algorithm in Simulink, implementing software/hardware-in-the-loop simulation of eight UAVs flying in a circular trajectory, validating control algorithm effectiveness and data transmission efficiency.

Experiment 9: UAV Swarm Collision-Avoidance Speed Control

📝 Experiment Overview:
Implement automatic collision-avoidance speed control for UAV swarm formations using MATLAB/Simulink, utilizing the artificial potential field algorithm to achieve various formation transitions and obstacle avoidance functions, including both software-in-the-loop and hardware-in-the-loop simulation modes.

Experiment 10: UDP Simple 8-UAV Swarm Control

📝 Experiment Overview:
Utilize the RflySim platform's UDP communication interface to control 8 UAVs to take off and fly along concentric circular trajectories via the MAVLink_Full UDP mode, achieving swarm control, coordinate system transformation, and coordinated flight.

Experiment 11: Vehicle-UAV Cooperative Tracking Experiment

📝 Experiment Overview:
Through coordinated motion between quadrotor UAVs and unmanned ground vehicles, understand the control logic and communication mechanisms of multi-agent systems, implementing UAV tracking control of unmanned ground vehicles.

Experiment 12: Multi-UAV Point-Position Formation Control Experiment

📝 Experiment Overview:
Implement multi-UAV point-position flight and formation control using Matlab/Simulink, covering UDP communication, PID control, and software/hardware-in-the-loop simulation.

Experiment 13: Automatic Collision-Avoidance Speed Control Swarm Formation Simulation

📝 Experiment Overview:
Demonstrate different UAV formation transitions and formation functions through software/hardware-in-the-loop simulation, learning swarm formation control and collision detection principles based on algorithms such as the artificial potential field.

Experiment 14: Distributed Local Area Network Point-to-Point Communication 8-UAV Simulation Experiment

📝 Experiment Overview:
This experiment utilizes the RflySim platform's swarm simulation capabilities to jointly perform a circular flight simulation of 8 UAVs across two computers on a local area network, learning distributed simulation configuration and operation methods.

Experiment 15: Vehicle-UAV Cooperative Experiment (with Yaw Control)

📝 Experiment Overview:
Master the cooperative control methods of UAVs and unmanned ground vehicles, understand the yaw PID regulation mechanism, and become familiar with PX4 Offboard mode and multi-threaded programming implementation.

Experiment 16: Matlab Multi-UAV Circular Trajectory Formation Control

📝 Experiment Overview:
Implement circular trajectory formation flight control for 6 UAVs using Matlab/Simulink, learning PID control, UDP communication, and circular trajectory parameterization design, covering core processes such as initialization configuration, trajectory generation, and mode switching.

Experiment 17: UAV Swarm Collision-Avoidance Formation Control Experiment

📝 Experiment Overview:
This experiment implements UAV swarm formation control using MATLAB/Simulink, demonstrating transitions between three formations (triangle, horizontal line, vertical line). It employs the artificial potential field algorithm to achieve automatic obstacle avoidance and formation transformation, including both software and hardware-in-the-loop simulations.

Experiment 18: Multi-UAV Figure-8 Trajectory Tracking Control Experiment

📝 Experiment Overview:
Implement single/multi-UAV figure-8 trajectory tracking control using Matlab/Simulink, covering software-in-the-loop and hardware-in-the-loop simulations, learning Lissajous curve trajectory generation and multi-UAV formation coordination mechanisms.

Experiment 19: Heterogeneous UAV and Unmanned Surface Vehicle Cooperative Tracking Experiment

📝 Experiment Overview:
Master the cooperative control and communication mechanisms of heterogeneous multi-agent systems, learn PX4 Offboard mode and UDP-based multi-threaded communication, and implement real-time UAV tracking of unmanned surface vehicles.

Experiment 20: Multi-UAV Leader-Follower Formation Control Experiment

📝 Experiment Overview:
Implement multi-UAV leader-follower formation control using Matlab/Simulink, covering core content such as UDP communication, formation flight, and software/hardware-in-the-loop simulation.

Experiment 21: Surface Unmanned Vehicle Cable-Towed Underwater Unmanned Vehicle Cooperative Control Experiment

📝 Experiment Overview:
This experiment uses a surface unmanned vehicle (USV) to tow an underwater unmanned vehicle (UUV) via a cable, learning the cooperative control principles of heterogeneous unmanned systems, mastering the cable-towing-based dynamics model and the application of PX4 Offboard mode in simulation.

Experiment 22: Multi-UAV Multi-Trajectory/Formation Control Experiment

📝 Experiment Overview:
Use Matlab and the RflySim toolchain to implement switching control of multiple UAV formations and various trajectories (such as figure-8, square, spiral, etc.), covering software-in-the-loop and hardware-in-the-loop simulations.

Experiment 23: Multi-UAV Virtual Structure Formation Control Experiment

📝 Experiment Overview:
This experiment implements multi-UAV formation control based on the virtual structure method using Matlab/Simulink, covering UDP communication, hierarchical control architecture, and formation flight simulation.

Experiment 24: Motion Capture Scene Vehicle-UAV Cooperative Tracking Experiment

📝 Experiment Overview:
Through coordinated motion between quadrotor UAVs and unmanned ground vehicles, understand the heterogeneous communication mechanisms and control logic of multi-agent systems, implementing real-time UAV tracking and following of unmanned ground vehicles with automatic nose alignment.

10.5.4 Advanced Custom Development Experiments

Stored in the 10.RflySimSwarm\3.CustExps folder, these experiments are designed for advanced users engaged in custom development.

Experiment 1: Custom Interface Experiments

📝 Experiment Overview:
A collection of custom interface experiments for clients, covering customized capabilities such as swarm control program packaging, distributed communication API extensions, and embodied intelligence reinforcement learning. These experiments help users extend RflySim swarm control capabilities to engineering deployment scenarios including program delivery, cross-machine communication, and agent training.

Experiment 2: Quadrotor Distributed Trajectory Tracking Experiment

📝 Experiment Overview:
A quadrotor UAV formation control experiment based on the leader-follower method, using the Python interface to control multiple UAVs for distributed trajectory tracking and cooperative flight.

Experiment 3: Distributed LAN Point-to-Point Communication 16-UAV Simulation Experiment

📝 Experiment Overview:
This experiment utilizes the RflySim platform to co-simulate 16 UAVs in circular flight across two computers on a local area network, learning distributed swarm simulation configuration and multi-UAV cooperative control.

Experiment 4: Quadrotor Distributed Trajectory Tracking Experiment (WSL)

📝 Experiment Overview:
This experiment migrates the quadrotor formation control algorithm from a traditional operating system to WSL, implementing distributed trajectory tracking for four UAVs based on the leader-follower method. The aircraft are controlled via the Python interface, resolving cross-platform compatibility issues.

Experiment 5: Multi-UAV Point-Mass Model Swarm Experiment

📝 Experiment Overview:
Based on the RflySim platform, this experiment targets large-scale UAV swarms at the 30-, 100-, and 200-UAV levels, validating takeoff, circular flight, and multi-UAV cooperative control effects without relying on the PX4 closed loop, while evaluating resource capacity and scalability at different scales.

Experiment 6: Swarm Intelligence Control Experiments

📝 Experiment Overview:
This experiment compiles swarm intelligence routines, covering typical intelligent control problems such as multi-UAV path planning, swarm cooperative obstacle avoidance, and area defense. It teaches the application of optimization algorithms, swarm intelligence methods, and reinforcement learning strategies to RflySim swarm control.

Experiment 7: Quadrotor Distributed Trajectory Tracking Experiment (VMware)

📝 Experiment Overview:
This experiment migrates the control algorithm to an Ubuntu virtual machine, implementing quadrotor UAV formation based on the leader-follower method. The aircraft are controlled via the Python interface for distributed trajectory tracking, learning multi-UAV cooperative control and network data forwarding.

Experiment 8: 50-UAV Formation Control Hardware-in-the-Loop Simulation

📝 Experiment Overview:
This experiment utilizes the RflySim platform for co-simulation across multiple computers on a local area network, achieving hardware-in-the-loop simulation of 50 UAVs divided into three groups for formation control, learning distributed swarm simulation architecture and UDP network communication.

Experiment 9: 100-UAV Formation Control Hardware-in-the-Loop Simulation

📝 Experiment Overview:
This experiment utilizes the RflySim platform's cluster simulation function for co-simulation across multiple computers on a local area network, achieving formation control of 100 UAVs divided into three groups, learning UDP communication between master and slave computers and distributed simulation configuration.

Experiment 10: Quadrotor Distributed Trajectory Tracking Experiment

📝 Experiment Overview:
A quadrotor UAV formation based on the leader-follower method, using DistSim remote control nodes to achieve multi-UAV distributed simulation, learning formation control and remote operation.

Experiment 11: Quadrotor Distributed Trajectory Tracking Experiment

📝 Experiment Overview:
A quadrotor UAV formation control experiment based on the leader-follower method, migrating the control algorithm from a traditional operating system to Ubuntu, achieving multi-UAV cooperative trajectory tracking through distributed networking.

Experiment 12: PX4 SITL and Point-Mass Model Hybrid Large-Scale Swarm Experiment

📝 Experiment Overview:
Through the RflySim platform, master flight control methods for hybrid heterogeneous UAV swarms, including two simulation modes (PX4 SITL and point-mass model), MAVLink Offboard control procedures, large-scale hybrid formation control, NED coordinate system, and fixed-frequency control loop design.

Experiment 13: Ant Algorithm-Based Multi-UAV Path Planning

📝 Experiment Overview:
By applying and optimizing the ant algorithm, plan feasible and optimal obstacle-avoiding and collision-avoiding paths for multiple UAVs, learning ant colony algorithm principles, improvement strategies, and multi-UAV coordination constraints.

Experiment 14: Distributed 8-UAV Broadcast Communication Simulation

📝 Experiment Overview:
Demonstrates a distributed simulation system based on RflySim, achieving cooperative flight control of 8 UAVs via LAN UDP broadcast, mastering distributed architecture and Git deployment methods.

Experiment 15: Distributed LAN Broadcast Communication 16-UAV Simulation Experiment

📝 Experiment Overview:
This experiment utilizes the RflySim platform's cluster simulation function to co-simulate 16 aircraft in circular flight on two computers within a local area network, learning distributed multi-UAV cooperative simulation configuration and operation methods.

Experiment 16: Swarm Control Program EXE File Generation

📝 Experiment Overview:
This experiment demonstrates converting a Simulink simulation program for 4 UAVs into an executable .exe file, learning MATLAB/Simulink code generation and VS compiler configuration, verifying that the exe correctly executes UAV simulation tasks and evaluating its performance.

Experiment 17: DistSim Distributed Cluster Simulation Communication Test

📝 Experiment Overview:
Learn the basic usage of DistSim software, implementing distributed cluster simulation communication between two computers, including operations such as node discovery and command sending.

Experiment 18: 30-UAV Point-Mass Model Swarm Experiment

📝 Experiment Overview:
Based on the RflySim platform, combining high-precision 6DOF models with real PX4 flight controllers, implement takeoff and circular flight tasks for 30 quadrotors, evaluating the improvement in flight performance achieved by combining the model with the flight controller.

Experiment 19: Large-Scale UAV Formation Swarm Experiment

📝 Experiment Overview:
This experiment targets hardware formation swarms at the 50- and 100-UAV scale, achieving large-scale UAV formation control, task grouping, and hardware-in-the-loop/co-simulation validation through coordinated deployment across multiple computers, learning state synchronization, resource scheduling, and formation control methods.

Experiment 20: Distributed Simulation 8-UAV Experiment

📝 Experiment Overview:
Based on the RflySim platform, demonstrate the distributed simulation system architecture, learn to collaboratively run an 8-UAV swarm simulation on multiple computers, mastering Git code synchronization, JSON configuration-driven, and UDP network communication configuration methods.

Experiment 21: Quadrotor UAV Swarm Distributed Simulation Experiment

📝 Experiment Overview:
Configure a distributed simulation environment through the RflySim platform, implementing leader-follower formation control and cooperative trajectory tracking for a quadrotor UAV swarm, mastering multi-UAV coordinated control methods.

Experiment 22: NoPX4SITL100Swarm

📝 Experiment Overview:
Based on the RflySim platform, use Python point-mass models to implement takeoff and circular flight simulation for a swarm of 100 quadrotor UAVs, evaluating the improvement achieved by combining high-precision models with real flight controllers.

Experiment 23: Olfati-Saber Multi-UAV Obstacle Avoidance and Collision Avoidance

📝 Experiment Overview:
Use the Olfati-Saber swarm algorithm to achieve obstacle avoidance, collision avoidance, and target aggregation for multiple UAVs in obstacle environments, learning distributed cooperative control strategies.

Experiment 24: DistSim-Based Custom IP 16-UAV Experiment

📝 Experiment Overview:
This experiment demonstrates how to establish a distributed communication system between two computers to control 16 UAVs for cooperative flight, learning distributed simulation system configuration, network communication settings, and multi-UAV cooperative control principles.

Experiment 25: Embodied Intelligence Reinforcement Learning-Driven Quadrotor Acceleration Hover Control

📝 Experiment Overview:
This experiment uses the RflySim and Genesis platforms to learn training a quadrotor UAV for acceleration-level hover control using the PPO algorithm, covering the complete workflow including reinforcement learning environment modeling, policy training, acceleration-to-motor control bridging, domain randomization, and software-in-the-loop validation.

Experiment 26: UAV Area Defense Experiment

📝 Experiment Overview:
Use an improved MADDPG deep reinforcement learning algorithm to train a UAV defense model, using fewer defensive UAVs to counter attacking UAVs and achieve effective area defense.

Experiment 27: 200-Quadrotor Dual-Computer Swarm Simulation

📝 Experiment Overview:
Based on the RflySim platform, combining high-precision 6DOF models with real PX4 flight controllers, implement takeoff and circular flight simulation for 200 point-mass quadrotors through the collaboration of two computers on a local area network, evaluating model accuracy and swarm control effectiveness.

Experiment 28: 10-UAV Circular Trajectory Flight Experiment

📝 Experiment Overview:
Implement Offboard control of 10 UAVs through the RflySim cluster Simulink-RflyUdpFast interface, enabling them to fly along a circular trajectory after takeoff, covering both software-in-the-loop and hardware-in-the-loop simulations.

Experiment 29: Swarm Distributed Simulation Experiment

📝 Experiment Overview:
Build a distributed simulation environment containing Windows and NX nodes based on the RflySim platform, learning distributed simulation architecture, Git code deployment, multi-node collaborative simulation, and master-slave node coordination control mechanisms.

Experiment 30: Rule-Based Strategy 5v5 UAV Area Defense System

📝 Experiment Overview:
Through a simplified 5v5 UAV area defense confrontation system, learn rule-based UAV behavior decision-making mechanisms, master the basic principles of UAV swarm control, and RflySim simulation operations.