# Increase in vel\_gain issue

**URL:** <https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762>\
**Category:** ODrive Pro Support\
**Created:** [December 4, 2025, 9:08pm UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762 "2025-12-04T21:08:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSR](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ssr/32/5902_2.png) [@SSR](https://discourse.odriverobotics.com/u/SSR)\
**Post date:** [December 4, 2025, 9:08pm UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762/1 "2025-12-04T21:08:57Z")

</div>

Hi, I’m seeing an issue with ODrive position control; when I set vel\_gain (kd) to 0.95 the motor is stable and quiet. But after increasing it slightly to 1.0, the motor starts buzzing. I’m not sure why is this happening. I would really appreciate any guidance on what might cause this and how to avoid it.

Thank you so much!

---

<div class="post-metadata">

**Author:** ![solomondg](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@solomondg](https://discourse.odriverobotics.com/u/solomondg)\
**Post date:** [December 4, 2025, 11:25pm UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762/2 "2025-12-04T23:25:12Z")

</div>

vel\_gain isn’t a Kd – it’s a proportional velocity gain. So it makes sense that increasing it could make the gains unstable. It may be worth even lowering it a bit, so that any changes in your system’s physical parameters don’t inadvertently cause the gains to become unstable.

---

<div class="post-metadata">

**Author:** ![SSR](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ssr/32/5902_2.png) [@SSR](https://discourse.odriverobotics.com/u/SSR)\
**Post date:** [December 5, 2025, 4:08pm UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762/3 "2025-12-05T16:08:38Z")

</div>

Hey, I’m sorry I meant Kd, I got a bit confused. Increasing Kd to 1.0, is making the buzz noise.

---

<div class="post-metadata">

**Author:** ![solomondg](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@solomondg](https://discourse.odriverobotics.com/u/solomondg)\
**Post date:** [December 5, 2025, 4:31pm UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762/4 "2025-12-05T16:31:32Z")

</div>

I don’t think there’s a Kd anywhere in the ODrive gains. What parameter specifically are you changing? Or are you running a PID loop externally?

---

<div class="post-metadata">

**Author:** ![SSR](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ssr/32/5902_2.png) [@SSR](https://discourse.odriverobotics.com/u/SSR)\
**Post date:** [December 5, 2025, 4:36pm UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762/5 "2025-12-05T16:36:37Z")

</div>

I’m trying to run a PD loop, I was using axis0.controller.config.vel\_gain for changing Kd parameter. I want to change the proportional velocity gain, but I’m not sure which parameter command to use.

---

<div class="post-metadata">

**Author:** ![solomondg](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@solomondg](https://discourse.odriverobotics.com/u/solomondg)\
**Post date:** [December 5, 2025, 6:06pm UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762/6 "2025-12-05T18:06:45Z")

</div>

Gotcha. The ODrive loop structure is not a PD loop, but with a bit of math, you can transform the two to be equivalent. Derivation below:

Definitions:

- t\_ref is the torque setpoint output from the controller
- w is the measured velocity
- w\_ref is the velocity setpoint
- θ is the measured position
- θ\_ref is the position setpoint
- w\_err is the velocity error, defined as (w\_ref - w)
- θ\_err is the position error, defined as (θ\_ref - θ)
- pos\_gain (units of Nm/rev) and vel\_gain (units of Nm/rev/s) are the standard ODrive gains for the nested control loop. We’re ignoring vel\_integrator\_gain, and assuming it’s set to 0.

The ODrive control loop has the structure of:  
(1) `w_ref = pos_gain * (θ_ref - θ)`  
(2) `t_ref = vel_gain * (w_ref - w)`

Or, combining and simplifying eqn (1) and (2):  
(3) `t_ref = vel_gain * (pos_gain * θ_err - w)`

For a PD loop, we want the structure of:  
(4) `t_ref = Kp * θ_err + Kd * d/dt(θ_err)`  
The derivative of the position error is just the negative velocity, so this is the same as:  
(5) `t_ref = Kp * θ_err + Kd * -w`

If we reformat eqn (3) to look like a PD controller (5), we get:  
(6) `t_ref = vel_gain * pos_gain * θ_err + vel_gain * -w`

So here, we can say that our `Kp` is `vel_gain * pos_gain`, and that our Kd is `vel_gain`. But it’s very important to note that Kp is _not_ just `pos_gain`.

So if you have some given Kp/Kd, you can transform that to pos/vel gains with:  
`pos_gain == Kp/Kd`  
`vel_gain == Kd`

---

<div class="post-metadata">

**Author:** ![solomondg](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@solomondg](https://discourse.odriverobotics.com/u/solomondg)\
**Post date:** [December 5, 2025, 6:07pm UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762/7 "2025-12-05T18:07:28Z")

</div>

As an additional point, we generally think the nested control structure we use is easier/simpler to tune and understand than a PD controller. Is there a specific reason you’re trying to go for PD control?

---

<div class="post-metadata">

**Author:** ![SSR](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ssr/32/5902_2.png) [@SSR](https://discourse.odriverobotics.com/u/SSR)\
**Post date:** [December 5, 2025, 8:16pm UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762/8 "2025-12-05T20:16:15Z")

</div>

Hi, thank you so much for the prompt reply! I really appreciate it.

That makes a lot of sense! Thank you for explaining. There isn’t a specific reason for PD. The nested loop looks more convenient. I’ll use that.

---

<div class="post-metadata">

**Author:** ![solomondg](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@solomondg](https://discourse.odriverobotics.com/u/solomondg)\
**Post date:** [December 6, 2025, 1:12am UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762/9 "2025-12-06T01:12:42Z")

</div>

Gotcha! Yes, would definitely recommend just going with the standard approach. We have a tuning guide here: [Tuning the Controller — ODrive Documentation 0.6.11 documentation](https://docs.odriverobotics.com/v/latest/guides/tuning.html)

---

<div class="post-metadata">

**Author:** ![SSR](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ssr/32/5902_2.png) [@SSR](https://discourse.odriverobotics.com/u/SSR)\
**Post date:** [December 8, 2025, 4:17pm UTC](https://discourse.odriverobotics.com/t/increase-in-vel-gain-issue/13762/10 "2025-12-08T16:17:00Z")

</div>

Thank you so much for your help! I really appreciate it!
