# Dojo - simulating a quadcopter

**URL:** https://discourse.julialang.org/t/dojo-simulating-a-quadcopter/90050
**Category:** Modelling & Simulations
**Created:** [November 10, 2022, 1:30pm UTC](https://discourse.julialang.org/t/dojo-simulating-a-quadcopter/90050 "2022-11-10T13:30:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel\_Lewis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daniel_lewis/32/31250_2.png) [@Daniel\_Lewis](https://discourse.julialang.org/u/Daniel_Lewis)
#### Post date: [November 10, 2022, 1:30pm UTC](https://discourse.julialang.org/t/dojo-simulating-a-quadcopter/90050/1 "2022-11-10T13:30:47Z")

</div>

Hello,  
I started working on a multi rigid body dynamic using `Dojo.jl`.  
I’m interested in simulating a Quadcopter, my question is : How can I simulate the fan’s thrust force?  
thanks  
Daniel

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [November 11, 2022, 6:33am UTC](https://discourse.julialang.org/t/dojo-simulating-a-quadcopter/90050/2 "2022-11-11T06:33:37Z")

</div>

How much accuracy do you need? As a first principle approximation the force is proportional to the square of the set value of the speed…

Second effect to take into account: The thrust depends on the apparent wind velocity. There is a value of v\_a when the thrust becomes zero.

Third effect: The acceleration of motor and rotor is limited, so the actual value of the speed cannot change immediately.

If you take these three effects into account you are already pretty good…

See also:

- [Calculate the Thrust Force on Your Drone! | WIRED](https://www.wired.com/story/calculate-thrust-force-on-a-drone/)
- [https://www1.grc.nasa.gov/beginners-guide-to-aeronautics/thrust-equation/](https://www1.grc.nasa.gov/beginners-guide-to-aeronautics/thrust-equation/)
- [https://commons.erau.edu/cgi/viewcontent.cgi?article=1427&context=ijaaa](https://commons.erau.edu/cgi/viewcontent.cgi?article=1427&context=ijaaa)

---

<div class="post-metadata">

### Author: ![Daniel\_Lewis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daniel_lewis/32/31250_2.png) [@Daniel\_Lewis](https://discourse.julialang.org/u/Daniel_Lewis)
#### Post date: [November 13, 2022, 6:46am UTC](https://discourse.julialang.org/t/dojo-simulating-a-quadcopter/90050/3 "2022-11-13T06:46:26Z")

</div>

thank for the reply this will be most helpful, my next issue is how do I implement this forces in the simulation.  
When going over the API I found a section `Defining a Controller`, at this section there is an example of single pendulum swing-up.  
This example gives the general idea of how to work with the controller but it’s too simple.  
what I don’t understand is this:

1. If my mechanism is a multi-body, how do I find and control a specific body/joint?
2. In the example they control the pendulum angle, is the controller, by closing loop on the angle, apply a kinematic behavior (that is ignore the dynamic of the system) or does it always apply forces only?
3. If I have a floating body, like quadcopter, how can I write a controller which will apply the thrust forces of the 4 fans (given the question above)?

If any one has an example or can help me understand how to implement this I’ll be grateful.  
and again thanks for any and every one.
