Vibration in closed-loop control mode

[ODrive Micro] Vibration in closed-loop control with brushless DC motor — reducing encoder_bandwidth suppresses vibration, but forces fw_fb_bandwidth down and degrades control performance


Setup

  • Controller: ODrive Micro
  • Motor: CubeMars GL40 KV70 gimbal motor
  • Encoder: ODrive Micro onboard encoder

Problem Summary

With the default setting (encoder_bandwidth = 1000), the motor vibrates noticeably upon entering closed-loop control — specifically in velocity control mode with input_vel = 0. The vibration is not extremely loud, but is clearly felt by hand.

I confirmed that reducing encoder_bandwidth (e.g., from 1000 to 200) significantly suppresses the vibration, which leads me to conclude that encoder noise is the root cause.

(As a side note, the vibration is less severe in torque control mode.)

I also tried reducing vel_gain directly from the dashboard. This partially reduced the vibration, but did not eliminate it entirely. Furthermore, reducing vel_gain too much caused the motor to fail to track the target velocity, so I could not continue lowering it.


The tradeoff I am stuck on

Lowering encoder_bandwidth introduces phase lag into vel_estimate. In an attempt to maintain cascade stability, I tried to keep the following condition satisfied:

encoder_bandwidth ≥ 2 × fw_fb_bandwidth

This means reducing encoder_bandwidth forces me to also reduce fw_fb_bandwidth, which in turn lowers the auto-set vel_gain and vel_integrator_gain. At the settings where vibration disappears, the velocity loop becomes unacceptably sluggish (~1–2 Hz effective bandwidth).

In short: suppressing the noise makes the control performance too slow to be practical.


Calibrated motor parameters vs. datasheet (for reference)

Parameter Expected (line-to-neutral) ODrive calibrated Error
phase_resistance 2250 mΩ 1609 mΩ −28.5%
phase_inductance 900 μH 931 μH +3.5%

Inductance appears well calibrated. Resistance is underestimated by ~28%, which may affect the current loop integrator gain, but I do not believe it is the primary cause of the vibration.


Questions

  1. Is it expected that the ODrive Micro onboard encoder produces significant noise when driving a high-pole-pair gimbal motor like the GL40 KV70? Is this a known issue?
  2. Is there any way to filter vel_estimate independently of encoder_bandwidth — i.e., suppress the noise while keeping fw_fb_bandwidth high enough for adequate control performance?

Any advice would be greatly appreciated.

fw_fb_bandwidth is only for field weakening, which I assume you’re not using – you can ignore that parameter.

which in turn lowers the auto-set vel_gain and vel_integrator_gain

Changing the bandwidth parameters shouldn’t change the velocity controller gains automatically.

Inductance appears well calibrated. Resistance is underestimated by ~28%, which may affect the current loop integrator gain, but I do not believe it is the primary cause of the vibration.

This should be fine, yeah.

Generally I’d expect you shouldn’t have to change the encoder_bandwidth from default when using the onboard encoder.

Is it expected that the ODrive Micro onboard encoder produces significant noise when driving a high-pole-pair gimbal motor like the GL40 KV70? Is this a known issue?

The vibration you’re feeling is likely just the encoder noise and current controller noise – a future firmware update should significantly help the noise, and it should reduce in general as load/inertia is added to the motor. Some amount is expected, but if it’s in excess, this could also be caused by inadequate magnetic field strength. Could you run onboard_encoder0.get_field_strength() and show the results? It should be 0.045 or higher for proper operation. This is also a good page to review: Designing for Magnetic Encoders — ODrive Documentation 0.6.12 documentation

1 Like

Thank you for the quick and accurate help.

I ran get_field_strength() as suggested, and the result was 0. After checking, I realized the issue:
I had purchased the GL40 with the encoder version, and replaced the original encoder with the Micro’s onboard magnetic encoder - reusing the motor’s original magnet as-is.

The signal was being read and pos_estimate was visibly changing, so I assumed everything was fine. However, the magnet is a ring-type designed to accommodate the hollow shaft. While it was diametrically magnetized, the field strength it provided was insufficient for the onboard encoder.

As a quick fix, I inserted a small diametrically polarized cylinder magnet into the hollow shaft. The field strength is now 0.074, which exceeds the 0.045 threshold.

After this fix, vibration in both position and velocity control modes is clearly reduced. This was also confirmed via the dashboard plot, where the encoder noise is visibly lower than before.

For any remaining noise, I will look forward to further improvements in a future firmware update.

1 Like

Great to hear!! Yes, low field strength definitely can cause noise. Make sure the new magnet is really well bonded in there – some epoxy or superglue is a must.

1 Like