File Exchange

image thumbnail

Crazyflie Quadcopter Simulation Using Simmechanics

version (64.9 KB) by Wooshik Kim
Quadcopter Simulator


Updated 20 Dec 2017

View License

*Run Crazyflie_Param before the simulink file.
This uses Crazyflie parameters to simulate a quadcopter.
Attitude controller uses nested PID controller that comes with the Crazyflie firmware.
Input is PWM where 65535 is the maximum value. (16 bit which is same as Crazyflie Firmware)
PWM to thrust and propeller rotation mapping is from Crazyflie System Identification paper. (System Identication of
the Crazyflie 2.0 Nano Quadrocopter by Julian Forster)
Position to attitude tracker uses a simple PID controller to map x,y error to roll, pitch reference.
I made this for class project. It is simple, does not require any toolboxes (which is why I made it), and organized in a way that is easy to follow. I hope this helps with whatever project you guys are working with!

Cite As

Wooshik Kim (2021). Crazyflie Quadcopter Simulation Using Simmechanics (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)


Shashank Narla

@sanwa The pwm to thrust and pwm to w* looks like a transfer function. This is experimentally obtained and is consistent with the paper - "System Identification of Crazyflie 2.0 Nano quadcopter " - Julian Forster,2015.


how to understand the "pwm to thrust"and "pwm to w*".Please explain this.

kleo shat

Khanh Tran Ngoc

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

Community Treasure Hunt

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

Start Hunting!