![]() Square |
![]() Random |
![]() Melon |
![]() Chirp |
This repository accompanies the paper:
“Nonlinear System Identification Nano-drone Benchmark”
submitted to the Special Issue on Machine Learning and Control Engineering.
It provides a reproducible benchmark for nonlinear system identification based on real-world flight data collected from a Crazyflie 2.1 Brushless nano-quadrotor, together with reference models, training scripts, and a standardized multi-step evaluation protocol.
Learning-based system identification methods are increasingly used in aerial robotics, yet fair comparison remains difficult due to the lack of shared datasets, unified evaluation protocols, and reference implementations—particularly for nano-scale quadrotors operating in aggressive regimes.
This repository addresses this gap by providing:
- A real-flight nano-drone dataset (~75k samples) with synchronized motor inputs and full-state outputs.
- Reference identification models, including:
- Physics-based models
- Purely data-driven neural models
- Hybrid Physics + Residual models
- Recurrent (LSTM-based) models
- A standardized multi-step prediction benchmark, evaluating open-loop error propagation up to 0.5 s (50 steps at 100 Hz).
- Complete training, testing, and evaluation scripts to reproduce the results reported in the paper.
The benchmark focuses on system identification and prediction, not controller design.
The benchmark is built from real flight experiments conducted with a Crazyflie 2.1 Brushless nano-quadrotor in a motion-capture environment.
- Four motor angular velocities uₜ = [Ω₁, Ω₂, Ω₃, Ω₄]
- Position (world frame)
- Linear velocity (world frame)
- Orientation (quaternion, world frame)
- Angular velocity (body frame)
The resulting output vector has 13 dimensions, consistent with the formulation in the paper.
SquareRandomMelonChirp
Data from Square, Random, and Chirp trajectories are used for training, while Melon is reserved exclusively for testing, enforcing trajectory-level generalization.
The main branch focuses on the PyTorch-based identification models, training, and evaluation.
├── models/ # Model architectures (Phys, Neural, Hybrid, LSTM)
├── dataset/ # Data loading (PyTorch Dataset)
├── train/ # Training scripts
├── test/ # Testing scripts
├── results/ # Results analysis and notebooks
├── data/ # Datasets
├── out/ # Exported models and predictions
├── scalers/ # Data scalers
├── utils/ # Utility functions (plots, metrics, etc.)
├── animations/ # Visualizations of flights
├── figures/ # Generated plots
├── requirements.txt # Python dependencies
└── README.md
- Python 3.8+
- CUDA-capable GPU (recommended for training)
Install the standard requirements:
pip install -r requirements.txtThis project uses pytorch3d for 3D transformations (quaternions). If installation from requirements.txt, should file, try to build from sources:
Build from source / Download wheels You can download wheels from the PyTorch3D Wheel Builder or follow the official PyTorch3D installation guide.
The train/ directory contains scripts to train different models.
Example: Train an LSTM model
python train/train_lstm.py --train_trajs '["random", "square", "chirp"]' --epochs 500Example: Train a Physics+Residual model
python train/train_phys+res.pyThe test/ directory contains scripts to evaluate trained models over test trajectories. Predictions are saved in results/
Example: Test LSTM model
python test/test_lstm.pyUse results/model_comparison.py or results/model_comparison.ipynb to compare different models and generate plots.
python results/model_comparison.pyTrained models can be exported and profiled on the target STM32 platform using ST Edge AI Developer Cloud.
python utils/export_models.pyThe process to benchmark the execution time is as follows:
- Find the exported ONNX models under
out/exportand upload them to https://stedgeai-dc.st.com/home - Select the STM32 MCUs platform
- Export in
float32precision, with no quantization - Select the Balance between RAM size and inference time mode
- Profile on the STM32F469I-DISCO board, which matches the Crazyflie's STM32F405 in terms of CPU micro-architecture and memory hierarchy
- Rescale the profiled execution times to account for the different clock rates (180MHz vs 168MHz, respectively)
models/models.py implements:
PhysQuadModel: Physics-based model using rigid body dynamics and RK4 integration.ResidualQuadModel: Purely data-driven MLP model.PhysResQuadModel: Hybrid model (Physics + Neural Residual).QuadLSTM: LSTM-based model for temporal dependencies.
Additional resources are available in the .dev branch (check out origin/dev), including:
simulator/: A high-fidelity JAX-based quadrotor dynamics simulator.processing/: Scripts for processing raw ROS bag files into CSV/Parquet formats used by this repo.wheels/: Pre-built wheels for PyTorch3D (check if they match your system).
If you use this work in an academic context, we kindly ask you to cite the following publication:
- R. Busetto, E. Cereda, M. Forgione, G. Maroni, D. Piga, D. Palossi, ‘Nonlinear System Identification Nano-drone Benchmark’, arXiv pre-print 2512.14450, 2025 arXiv.
@misc{busetto2025sysid,
title={Nonlinear System Identification Nano-drone Benchmark},
author={Riccardo Busetto and Elia Cereda and Marco Forgione and Gabriele Maroni and Dario Piga and Daniele Palossi},
year={2025},
eprint={2512.14450},
archivePrefix={arXiv},
primaryClass={eess.SY},
url={https://arxiv.org/abs/2512.14450},
}Riccardo Busetto*1, Elia Cereda*1, Marco Forgione1, Gabriele Maroni1, Dario Piga1, Daniele Palossi1,2.
* Equal contribution.
1 Dalle Molle Institute for Artificial Intelligence (IDSIA), USI and SUPSI, Switzerland.
2 Integrated Systems Laboratory (IIS) of ETH Zürich, Switzerland.



