# Gazebo SDF file Motor Parameters definitions

**URL:** <https://discuss.px4.io/t/gazebo-sdf-file-motor-parameters-definitions/34747>\
**Category:** PX4 Autopilot\
**Created:** [October 11, 2023, 6:38am UTC](https://discuss.px4.io/t/gazebo-sdf-file-motor-parameters-definitions/34747 "2023-10-11T06:38:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aditya\_Vardhan](https://discuss.px4.io/user_avatar/discuss.px4.io/aditya_vardhan/32/14660_2.png) [@Aditya\_Vardhan](https://discuss.px4.io/u/Aditya_Vardhan)\
**Post date:** [October 11, 2023, 6:38am UTC](https://discuss.px4.io/t/gazebo-sdf-file-motor-parameters-definitions/34747/1 "2023-10-11T06:38:35Z")

</div>

Hi everyone,

I am new to Gazebo and I am facing problems in defining motor parameters. Can anyone give an understanding (also where to get it) of following parameters.

1. Time Constant Up - (Is it similar to hardware delay =\>time taken to get the physical effect(eg: RPM change) after command is given by controller)
2. Time constant down - ((Is it similar to hardware delay =\>time taken to get the physical effect(eg: RPM change) after command is given by controller)
3. Motor Constant - (was able to find value from below links but not matching with predefined motors of iris or typhoon drones)
4. Moment Constant - (was able to find value from below links but not matching with predefined motors of iris or typhoon drones)
5. Rotor Drag Coefficient - (Is it blades’ drag coefficient at max RPM)
6. Rolling moment Coefficient - (did not understand at all . is it rolling moment coefficient about rotor blade hinge line(at certain RPM) caused by aerodynamic force on blade at that particular RPM?)
7. Max Rotational Velocity (is it in rad/s, which is not matching with predefined motors)
8. Physically speaking, how does Yaw actually work in quad or hex drones? By doing differential RPM on rotors how does vehicle yaw? Is it something related to drag of the blade (while at certain RPM) causing reaction torque on body?

I also referred to

> <https://github.com/PX4/PX4-SITL_gazebo-classic/issues/110>
>
> Hi guys,
> 
> So here's the thing: I'm building a VTOL model similar to the standa…rd VTOL which has some specifications in terms of motor setup: for example, the front motors have less torque than the back motors, which are more powerful in order to keep the vehicle balanced. The pusher motor is also different from those.
> 
> Having some time already working with Gazebo SITL, I found out that most of the vehicle models have the same motor models, pretty similar configurations and even weights. The thing is, if one wants to create his own vehicle model, with proper inertia matrix and weight, it also needs to have the motors model with the correct setup.
> 
> So after some research, and trying to figure out how to compute the different parameters that compose the motor model in the SDF config, I came up with the following math for those:
> 
> \`Ω or Max Rotational Velocity = Kv \* Max Applied Voltage \* Max Motor Efficiency \* 2π / 60\`
> \`Motor Constant = Thrust / (Ω) ²\`
> \`Moment Constant = 60 / (2π \* Kv)\`
> \`Rotor Drag Coefficient = Thrust / (ρ \* (Kv \* Max Applied Voltage \* Max Motor Efficiency / 60) ² \* Propeller diameter ⁴)\`
> \`Rolling Moment Coefficient =\` Using SST turbulence model from \[reference\](http://www.cobaltcfd.com/pdfs/2016/AIAA-2016-1536.pdf), and bent/round wings/propellers: \`~0.0220 for angle of attack smaller than 16 degrees\` - I'm keeping this defaulted to \`1E-06\` for now.
> 
> where,
> \`Kv \[RPM/V\]\`
> \`Max Thrust \[N\]\`
> \`Max Applied Voltage \[V\]\`
> \`Ω Rotor angular velocity \[rad/s\]\`
> \`ρ Air density at 20ºC: 1.2041 \[kg/m³\]\`
> 
> The \`Motor Time Constant\` is still something I don't know how to get it.
> 
> So what I ask is for help from someone that dedicated time writing the motor model plugin and that knows how's the math structured so to confirm or correct the math above. This will be helpful to everyone facing the same trouble when wanting to properly simulate their vehicle models, and not just copy paste from the existing models.

> <https://github.com/PX4/PX4-SITL_gazebo-classic/issues/995>
>
> As mentioned by \[issue110\](https://github.com/PX4/PX4-SITL\_gazebo-classic/issues…/110) this issue, I got some questions about this model,
> 1. What are the units of rotational speed we used in the model, rad/s?
> 2. Why do we need the parameter (rotorVelocitySlowdownSim)? 
> 
> I am going to contructure my own model based on this one, any suggestion will be welcomed!!
> 
> Many thanks!

> **[notes.pdf](https://github.com/mvernacc/gazebo_motor_model_docs/blob/master/notes.pdf)**

Thanks in Advance

Aditya

---

<div class="post-metadata">

**Author:** ![Aditya\_Vardhan](https://discuss.px4.io/user_avatar/discuss.px4.io/aditya_vardhan/32/14660_2.png) [@Aditya\_Vardhan](https://discuss.px4.io/u/Aditya_Vardhan)\
**Post date:** [October 11, 2023, 6:39am UTC](https://discuss.px4.io/t/gazebo-sdf-file-motor-parameters-definitions/34747/2 "2023-10-11T06:39:06Z")

</div>

Can anyone please help

---

<div class="post-metadata">

**Author:** ![Dhruvil](https://discuss.px4.io/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@Dhruvil](https://discuss.px4.io/u/Dhruvil)\
**Post date:** [November 21, 2023, 8:30am UTC](https://discuss.px4.io/t/gazebo-sdf-file-motor-parameters-definitions/34747/3 "2023-11-21T08:30:46Z")

</div>

> [@Aditya\_Vardhan](#):
>
> 1. Physically speaking, how does Yaw actually work in quad or hex drones? By doing differential RPM on rotors how does vehicle yaw? Is it something related to drag of the blade (while at certain RPM) causing reaction torque on body?

With the a specific rotation speed and direction the motor + propeller generates torque in opposite direction of the propeller rotation. (i.e rotor rotates in CW, torque is generated in CCW).

When all motors are running at same speed, ideally there should be no yaw. when one motor rotates at higher speed, more torque is generated and yaw is generated.

---

<div class="post-metadata">

**Author:** ![Sabar](https://discuss.px4.io/letter_avatar_proxy/v4/letter/s/58f4c7/32.png) [@Sabar](https://discuss.px4.io/u/Sabar)\
**Post date:** [February 3, 2025, 11:41am UTC](https://discuss.px4.io/t/gazebo-sdf-file-motor-parameters-definitions/34747/4 "2025-02-03T11:41:20Z")

</div>

Hello. Did you solve this issue? I have the same difficulties in modifying the sdf parameters, for a heavier drone. I am using PX4 SITL and Gazebo harmonic.

Specifically, I want to simulate an Octorotor Coaxial. I modified the x500 quadrotor configuration and added four more motors. I also modified the .param file. It takes off and hover stably.

After that, I tried to increase the weight, inertia of the drone and propellers’ weight and size. The drone only takes off at 0.8m and does not reach the desired altitude. I also increased the maxRotvelocity but the problem persists.

Can you help and provide information on how can I do this? If there is anyone that could help I will upload the sdf file to replicate. Thank you in advance.

---

<div class="post-metadata">

**Author:** ![YLei](https://discuss.px4.io/user_avatar/discuss.px4.io/ylei/32/20523_2.png) [@YLei](https://discuss.px4.io/u/YLei)\
**Post date:** [October 23, 2025, 2:15pm UTC](https://discuss.px4.io/t/gazebo-sdf-file-motor-parameters-definitions/34747/5 "2025-10-23T14:15:40Z")

</div>

Hello Sabar, can you provid some valuable information and help please? I have the same problem. Thank you very much! : )
