View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
AR Drone Simulink Development-Kit V1.1

4.5 | 15 ratings Rate this file 134 Downloads (last 30 days) File Size: 307 KB File ID: #43719 Version: 1.13
image thumbnail

AR Drone Simulink Development-Kit V1.1



01 Oct 2013 (Updated )

Blockset for the simulation and Wi-Fi control of the Parrot ARDrone 2.0. Simulate, connect, and fly!

| Watch this File

File Information

The development kit consists of blocks and examples for the simulation and real-time Wi-Fi control of the Parrot AR Drone 2.0. 
The simulation blocks are based on models of the vehicle derived via system identification. The Wi-Fi control blocks are capable of sending commands to and reading the states of the drone in real-time.

The examples provide a framework for the control and guidance of the vehicle. These examples enable velocity and position control, waypoint tracking, and mission execution for the AR.Drone in both simulation and Wi-Fi control.

This development kit was produced in the context of the 2013 MathWorks Summer Research Internship project. For more information about the overall project to develop an automated autonomous emergency response system see:


This file inspired Control Ar Drone Parrot 2.0 With Matlab 2015a And Vicon.

Required Products Aerospace Blockset
Simulink Desktop Real-Time
Simulink Verification and Validation
MATLAB release MATLAB 8.2 (R2013b)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (46)
23 Feb 2017 nizar vv

Hi Amine i find the solution for your problem, all you have to do is to :
1) open the ''Velocity from vehicle body frame
to inertial NED frame'' block
2) copy and paste the following code :

function Vel_xy = fcn(Vel_b1,Vel_b2,psi)
T = [cos(psi) -sin(psi) ; sin(psi) cos(psi)] ;
Vel_xy = T*[Vel_b1;Vel_b2];

3) save the file
4) make the change in the simulink environment
i sent you a print screen.

The idea is to divide the signal (vector) into two signal (two scalar)

13 Feb 2017 abadi amine

hello i have this problem

Error in port widths or dimensions. Output port 1 of 'ARDroneHoverSim/Position estimation Important:This block provides an inaccurate extimation of position based on velocity information. /Position estimation/Velocity from vehicle body frame to inertial NED frame' is a [2x2] matrix.

Comment only
11 Jan 2017 taoge

taoge (view profile)

23 Jun 2016 Yonggun

I have tested recently through 2013b, but it doesn't contain Real-Time library. it should be higher than 2014b i guess..

Comment only
19 Jun 2016 icaro viana

is it possible run this toolkit in matlab 2013b?

Comment only
07 Jun 2016 Yonggun

Hello, for the ARDroneWPTracking file, when I build the simulink, it gives me error with

"File I/O error on file 'rtwin.tlc'
Operation that caused an error: open"

What should I do to fix this problem?

Comment only
16 Mar 2016 zheng wen

29 Feb 2016 KAAN CAN

Hi, when I try to use this kit for wifi control on real time, it gives me rtwintgt built error and then I can not connect to the drone again. Is there anyone else who can tell me why this happenning?

19 Jan 2016 Cristiano Petrocelli

Hi, does the kit works with parrot 1? Or it works only with parrot 2.0?

Comment only
08 Jan 2016 Sarah Duval

I can't run this add : Error using cd
Cannot CD to simulation.
Does somebody have an idea how to solve it ?
Is it because I have MATLAB 2015a ?

Comment only
08 Oct 2015 Jinang

Jinang (view profile)

The model gets disconnected (unloaded) from the target after random minutes (2/5/8min) by itself even though my laptop is connected to the drone's network.I am not able to run is reliably for long time without it getting disconnected.
any ideas as to why it happens?

Comment only
13 Jul 2015 melika mehran

I cant video stream. what I do?
plz help me

Comment only
13 Jul 2015 melika mehran

I need this library for windows

Comment only
26 Jun 2015 essaidedjekouane

Thanks ;)

03 Jun 2015 Shaima Al Hebsi

I am trying to integrate vicon cameras block (Quarc) with the ARDrone kit but I am getting error without being specified. Has anyone tried integrating both? Do you have any suggestion to solve this issue?


Comment only
27 May 2015 André

André (view profile)

How can I change the parameters of PID controller?

Comment only
26 May 2015 OJIJ

OJIJ (view profile)

for melika mehran
You can use other Matlab library for the video streaming of ArDone like this
There is other library like this
Good Luck

Comment only
25 May 2015 melika mehran

I want line follow simulation with drone with below camera
so I want to get video streaming with below camera.
how can I active below camera?
or how can I do it?
pleas help me

Comment only
24 May 2015 melika mehran

how can I active the below camera?
I want to get video streaming with below camera.
pleas Help me

Comment only
12 May 2015 muhd syahir

Hello, I have tried this and it work successfully thank you.

Currently I am doing project to control multiple ar drone using matlab simulink and this work seems nice to make modification for that purpose. Could you give me some guideline on how to multiple control?

Comment only
20 Apr 2015 OJIJ

OJIJ (view profile)

Is it possible to Test the Drone in open loop?

Comment only
02 Apr 2015 Bilal Hammoud

How is it possible to modify the blockset to send PWM commands instead,
for a regular m file I use the following
ARc = udp('', 5556, 'LocalPort', 5556);
PWM = sprintf('AT*PWM=1,0,0,0,0\r')
fprintf(ARc, PWM)
however i couldnt figure out how to modify the blockset

Comment only
09 Mar 2015 André

André (view profile)


Is it possible to add a PID controller and fuzzy in this toolkit?

Thank you

Comment only
02 Mar 2015 Pascal

Pascal (view profile)


I've problems to start, when I use start_here for wifi control and Hover, the function rtwbuild('ARDroneHover')...I've got a configuration windows asking for :
Set the 'Target hardware' parameter to match your target hardware.

But I don't have any target for the AR Drone....

What could be wrong ?

Comment only
19 Jan 2015 Antonio


I try to run the start_here file and I chose the Wi-Fi Control and Hover.

The problem is:

Warning: Block "Packet Output" references board "Standard Device UDP Protocol [15B4H]" wich is not on the installed boards list for this computer.

I don't understand how to connect with SIMULINK my DRONE. I connected the pc's wifi with drone.

04 Nov 2014 Arturo Casanova

02 Nov 2014 David Escobar Sanabria

James, check the updated version (1.1) that does not require the system identification toolbox to load the drone transfer functions for simulation.

Comment only
25 Oct 2014 Omair Tariq

One also needs "Embedded Coder" to be able to control the drone using Simulink.

This is missing in the "Required Products" list.

11 Oct 2014 James

James (view profile)

Hi ,

I started by running the "start_here.m" file.

I entered 1 to start a hover simulation. It then opens a Simulink Model.Specifically it opens the "ARDrone Simulation Block" . Once I run this simulation Block, I get the following errors :

Error in port widths or dimensions. Output port 1 of 'ARDroneHoverSim/ARDrone Simulation Block/State-Space1' has 6 elements. This port does not accept the dimensions (or orientation) specified by the output signal.

Error in port widths or dimensions. Invalid dimension has been specified for input port 1 of 'ARDroneHoverSim/ARDrone Simulation Block/State-Space3'.



12 Sep 2014 a

a (view profile)

Help me. How to use this file? I have Matlab2013b version. I connected drone's wifi by computer. And I click run button on matlab. But there are errors. How can I use this file to control AR Drone 2.0?

Comment only
12 Sep 2014 a

a (view profile)

Help me. How to use this file? I have Matlap2013b version. I connected drone's wifi by computer. And I click run button on matlab. But there are errors. How can I use this file to control AR Drone 2.0?

Comment only
01 May 2014 David Escobar Sanabria

That packet output block requests data from the drone. Another packet output block is used to send commands every sampling time.

Comment only
20 Apr 2014 javier vallejos

why ? the sammplingtime*10 in the Packet Output

13 Apr 2014 Ryan

Ryan (view profile)

Can someone with a more recent version of Simulink please post the files saved in MDL format. Thank you in advance!

Comment only
13 Apr 2014 Ryan

Ryan (view profile)

Would it be possible to save a copy of the Simulink files in mdl format rather than slx? I need this to run on r2011b.

Comment only
14 Mar 2014 Jeremy Wurbs

Thanks you guys for this toolkit, very well done.

I was wondering how you guys were able to get the video stream directly into Matlab. Currently I'm using ffmpeg to decode the stream but there is a ~3-5 second latency that is making controlling the drone difficult. Have you guys (or has anyone) been able to get the AR Drone video stream into Matlab with low latency? Any help is greatly appreciated!

05 Feb 2014 rean mark sayat

help please,i started to hover my drone ( i hit run button ) my problem is, it wont stop and dont want to land. It remain flying on the air. The stop button/icon was unable to be press(its blurred)

Comment only
28 Jan 2014 Michael

Will this submission work with Matlab R2013a student version if i have all the toolboxes and blocksets required?

Comment only
14 Jan 2014 Jordan

Jordan (view profile)

For some reason when I follow all of the steps to run the wifi control. The wifiControl/ARDroneWPTracking.xls file loads and then I connect and then run. But the compiler gets stuck at T =0 and then a warning message stating "a disconnect message was sent to the target 10..20...60 seconds ago and then it disconnects. and the model is unloaded. Any help on getting the program to run reliably/continuously. I've gotten it to run only 2 times.

Comment only
26 Dec 2013 David Escobar Sanabria

Hi Jose,

Check the following link:

I think you could use information from the kinect to control the drone. You should check if the blocks that talk with the kinect can be executed in external mode together with Real-Time-Windows-Target (RTWT). If this is possible, you can combine the Simulink blocks for the vehicle control and blocks that receive information from the Kinect.

If you are unable to do that, I would suggest you to open a MATLAB/Simulink session that reads the Kinect information and use UDP blocks to exchange data between the Simulink model that reads the kinect data and the Simulink/RTWT model that controls the drone.



Comment only
21 Dec 2013 jose

jose (view profile)

Hi. I was wondering if, for example i could use a Kinect for control this quadrotor using this same program. It's possible??? I excuse for my English, I'm from Ecuador and I barely write in English. Thanks!

13 Dec 2013 daher

daher (view profile)

hi.. i am having a problem with simulation :((( can you assist please!

Error using Stateflow.SLINSF.SubchartMan.clearMaskParams (line 2952)
Attempt to modify library or subsystem

Comment only
13 Nov 2013 Florian

01 Nov 2013 Sang-Joon Lee

18 Oct 2013 Paul Kassebaum

07 Oct 2013 Pieter Mosterman

This development kit was produced in the context of the 2013 MathWorks Summer Research Internship project. For more information about the overall project to develop an automated autonomous emergency response system see:

Comment only
02 Oct 2013 1.6

Modifying description of the blockset

03 Oct 2013 1.8

Adding logo.

15 Oct 2013 1.10

Updating description.

16 Oct 2013 1.12

Updating description 2.

02 Nov 2014 1.13

This version (1.1) removes the need of the System Identification Toolbox to load the drone transfer functions for simulation.

Contact us