This repository contains MATLAB scripts as well as recorded flight data used for system identification purposes on the commercial Parrot Bebop 2 drone.
For support regarding the usage of this repository, please contact one of the authors
Matthijs van der Boon - m.j.vanderboon@student.tudelft.nl
Pim de Bruin - p.e.debruin@student.tudelft.nl
Jasper Wiersema - j.d.wiersema@student.tudelft.nl
Eduard Jongkees - e.p.jongkees@student.tudeft.nl
Ewoud van Mourik - e.a.vanmourik@student.tudelft.nl
A special thank you is extended to H. Zhu for providing a lot of the code base for running flight experiments.
Files used for recording experiment data are located in /data
. A guide for experiment setup in the DCSC lab can be found here. A troubleshoot document is online here. Running run_main
starts an experiment. Run save_log
to save all recorded data after an experiment.
Roll, pitch and vertical velocity input vectors can be set in modules/CDrone
by setting object properties m_ppi_phi
, m_ppi_theta
, and m_ppi_vz
.
Scripts used for processing recorded data are located in /processing
. Run batch
to batch process all recorded data and save experiment data into separate data .mat
files.
Other scripts in this folder are used to analyse recorded data.
Files used for system identification are located in /systemidentification
. The main workflow to identify new models is as follows.
- use
batchIdentify
orCCDInitial
to identify new models using either random initial values, or initial values based on central composite design. - For first order models
FONLIFnc
orFOPTDNIFnc
are used for identification.GONLIdentification
is used to identify models of higher order. - Generated models are saved as
.mat
files.
Files used for system identification are located in /validation
. The workflow for validation is as follows.
- Pick the best identified model for each data set using
batchPicker
- Use
batchValidation
to validate the best models over validation data sets. Batch validation usessimGOFull
to simulate model responses. The results of validation are saved in.mat
files. - Run
[valddata, simdata] = simGOFull([],[])
to simulate the response of a desired model over a data set. UI dialogs are opened to select model and data. - Plot the response of the simulation by running
plotResultAndSave(valdata, simdata)
. Figures can be saved if desired.