The High Pitch Noise from the Motor while running the closed loop

High-Pitched Noise in Closed-Loop FOC (Working System, No Current Sensing)

Hi everyone,

I’m working on implementing closed-loop Field-Oriented Control (FOC) using the SimpleFOC library on an STM32-based system. The control itself is functioning well, but I’m facing a persistent high-pitched audible noisefrom the motor that I’m unable to eliminate.


System Overview

  • Control Method: Closed-loop FOC

  • Library: SimpleFOC

  • MCU: STM32 (G4 series)

  • Motor Type: BLDC

  • Feedback Sensor: Magnetic encoder (for position feedback)

  • Current Sensing: :cross_mark: Not implemented (voltage mode only)

  • Application Goal: Stable position hold / precise motion control (no-GPS stabilization use case)


Current Status

  • :white_check_mark: Motor rotates smoothly

  • :white_check_mark: Position control works reliably

  • :white_check_mark: Motor can hold position without noticeable drift

  • :white_check_mark: PID tuning improves responsiveness and precision

From a control standpoint, the system behaves as expected.


Observed Problem

  • The motor produces a continuous high-pitched noise during operation

  • Noise is present:

    • During rotation

    • During position hold

  • The noise:

    • Changes pitch when PID values are adjusted

    • Never fully disappears regardless of tuning


Troubleshooting Already Done

I’ve already tried the following without success:

:wrench: Motor & Configuration

  • Verified motor parameters (pole pairs, KV, etc.)

  • Ensured correct sensor alignment and direction

  • Confirmed stable angle feedback

:wrench: Control Tuning

  • Tuned velocity and position PID loops extensively

  • Adjusted:

    • P, I, D gains

    • Output ramp

    • Velocity limits

:wrench: Behavior Observations

  • System is stable (no visible oscillation or runaway behavior)

  • Noise persists even when system is well-tuned

Can Anyone put some light on what’s going wrong here?

Could it be PWM noise? Are you using the default 25KHz for STM32, or did you change driver.pwm_freqency to something in audible range?

Does it still happen in open loop mode? That will sort out whether it’s due to PID or something else. Make sure you set motor.voltage_limit low when testing since open loop applies full voltage at all times.

If your encoder is 12-bit, it may just be the limit of precision (PID jittering between two encoder steps). 14-bit is much better.

Can you feel the vibration with your fingers on the motor shaft?

What is the motor driving? If there’s anything rattly on it, an otherwise insignificant vibration can make an annoying noise.