How can I simulate multiple UAVs (e.g., 2 vehicles) in the UAV Package Delivery example model, and what parts of the model need to be duplicated vs shared?
Ältere Kommentare anzeigen
Hi!
I’m using the UAV Package Delivery example model (shortcut 8: photorealistic environment with high-fidelity plant model) and I want to simulate multiple UAVs in the same Simulink simulation (start with 2 UAVs).
My current assumption is that I need to duplicate some subsystems per UAV (plant, controller, sensors, etc.), but this model is large and complicated, so I’m not sure:
- Which blocks/subsystems must be duplicated per UAV (plant + controller + estimator + guidance + sensors?)
- Which blocks should be shared across all UAVs (scenario/world, environment, visualization, mission planner, etc.)
- How the data flow should be organized so each UAV stays independent (namespaces, buses, variants, model references, data dictionaries, etc.)
- How to correctly handle multiple instances of the Simulation 3D UAV Vehicle block / visualization, including transforms and coordinate frames, without conflicts
In addition, I eventually want each UAV to have its own mission plan coming from QGroundControl (QGC) (live mission feed). I found this related topic and plan to try it later, after I can run multiple UAVs first:
Extra context:
- I’m feeding a live predefined mission from QGC into the model.
- I modified the Simulation 3D Scene Configuration block to use Cesium ion visualization instead of the default Unreal environment.
- I’m currently working with the high-fidelity plant setup.
- I'm using MATLAB R2025b
If possible, I’d appreciate guidance like “duplicate these subsystems, keep these shared,” and any best practices (Model Reference, For Each Subsystem, variant subsystems, buses, etc.).
Thanks a lot. I appreciate any help.
Antworten (1)
Jianxin Sun
am 2 Mär. 2026
0 Stimmen
The Multirotor model reference itself represents a single multirotor with its own navigation controllers that tracks desired position input. You'll want to use multiple model references here to represent multiple multirotors.
The onboard computer subsystem represents a single onboard computer that processes sensor inputs and generate obstacle avoidance behavior. If you don't need such algorithms, you can remove it. Otherwise you should duplicate this along with the Unreal Camera and Lidar sensors.
If you are reading missions from multiple instances from QGC, you'll need to edit the MAVLinkInterface.m helper file in utilities\MAVLinkMissionProtocolExample folder to read mission from QGC for multiple UAVs
The Simulation 3D Scene Configuration block should be shared for all instances.
The data dictionary should also be shared for all instances. However, you'll probably need to parameterize the reference model properly to take different UAV configruations.
Kategorien
Mehr zu Guidance, Navigation, and Control finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!