File Exchange

image thumbnail

Simulate Quadrotor in Simulink with SimMechanics

version (7.77 MB) by Khanh Dang
This is a part of my research about Quadrotor ^^


Updated 07 Oct 2014

View License

This is my project to simulate Quadrotor in Matlab Simulink environment.
I have refer to Leonardo Araujo's model. And I have tried to make it become reasonable and simpler.
But I quite confuse with "Damping Coefficient". I don't know how to have a right choice for it. I hope someone has researched that problem, with pleasure, will help me answer that question.
Thanks for your help! ^^~

Cite As

Khanh Dang (2021). Simulate Quadrotor in Simulink with SimMechanics (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (30)

Junxun Luo

Senya Senya

Fawad Salam

hello I am using your assembly quadrotor in Simulink environment to control the quadrotor with reinforcement learning. you model is very helpful. can you tell me how can I reset the model in MATLAB script? because I have to reset the model during training which is the requirement of RL model. one more thing i have to reset my model based the value coming from joint. how can i used those joint value/signal in MATLAB script?

Yu hsin Lin

Yu hsin Lin

Francisco Molina

Francisco Molina

Francisco Molina

Francisco Molina

Xiang Chen

jihun Park


Sapan Shah

Respected sir,
Is it possible to add a manipulator cad model that I have made onto this quadcopter of yours and be able to control it with your controller by just adding the control signal of the manipulator in your quadcopter controller. If yes, Can you please suggest a way to do it?
Thanks for your help in advance.
Sapan Shah


djamel ounnas

Hi mister,
I have two questions to ask you,
1) Regarding the block (controller) I did not understand is what you calculated the rotor forces or their speed.
2) in the same block for which you have done the sum before the calculations of the speeds.
  thank you.

Khanh Tran Ngoc

Cảm ơn a nhiều!

Deep Shekhar Acharya

The zip file is corrupted! I am unable to extract it after download. Please help!

Matheus Morgado

Nejc Dezelak

Hemanthakumar H N

Thank you Khanh Dang for sharing your worthful work

Emmanuel Otsapa

Great work.Any idea on how to do something similar but adding collision avoidance capabilities in a fully animated obstacle area

ömer Yalcin


Hi. I have a drone with one motor in simmechanics. But i dont know how can i give altitude to my drone. Can anyone help me please?

muhammad uzair

hi how to add quad-router simulink library in matlab?


Hi @Mohamed Abdelkader Zahana, thank you so much for your suggestion, Mohamed ^^~

Hi @Jonathan, you can also find my design here :)

Hi @srinivasa ramanujam, if you want, you can copy and paste the whole blocks. Then you will have 3 other quadcopters. After that you can apply whatever control solutions to these 4 quadcoters.. ^^"

srinivasa ramanujam

Dear Khanh,
i just downloaded your simulink model. i am working on 4 quadcopters flying together, if you can help me doing this in simulink that would be great


Dear Khanh,

Do you have the CAD assembly export for this quadrotor body? I'd like to use it to load into a model that I am working on. I don't have a CAD tool though.

Dear Khanh,
I noticed that the 'Base sensor' that you are using is similar to those in Leonardo Araujo model. Anyway, if you are using the latest MATLAB version, or v2013 and afterwards, then you can simply measure the attitude from the 6-DOF block of the part (base), and this what I used. It works!

Khanh Dang

Dear Mohamed Abdelkader
I used many block as you see because when I had completed my model by Solidwork, at that time I didn't think how to install sensors...

You can see how I install sensors as picture below...

Thanks Khanh. Actually, I am working on a similar thing, but for multi agent, and I will share once I finish. I have a question. How do you manage to measure the Euler angles (roll, pitch,yaw)? When I looked at the "Base and Sensor" block, I could not figure out why you are using these many blocks. I'd like to make some sense out of it. What about using the "Simmechanics block "Transform Sensor" block. Would it do the job?


Stalin Samuel

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: CAD-Based Simulator for Quadrotors

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!