PWM frequency, Id current, liveplotter

Hello everyone. I started ODRIVE V3.6-56V a few days ago. I’m using anaconda promt cmd(terminal).
Here are the specifications.
Motor > 48 V 200 W 750 rpm 36slot 42pole AS5047P sensor with 4000 cpr(A,B,I)
Firmware version 0.5.5

I have some questions.

1-Electric motor have 42 pole, and the coils are buzzing. I think its about PWM frequency. I want to change the switching frequency. Can i change PWM frequency in terminal ?

2-I’m checking the measured Id current when the motor spining . Id_measured must be around 0 according to FOC(ofcourse its oscillating around 0). I wonder that how much oscillating is acceptable ?
(Power supply about 0.5 A-48 V and Id_setpoint=0)(I added screenshot)

3-Does Odrive always use FOC on every control types(position, velocity, etc) ?

4-I want to use liveplotter but there are errors. The window looks just a moment. Here the errors.

In [1]: start_liveplotter(lambda:[odrv0.axis1.encoder.pos_estimate, odrv0.axis1.controller.pos_setpoint])
Out[1]: D:\anaconda3\lib\site-packages\odrive\ UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail.
  fig = plt.figure()
<threading.Event at 0x1f7e079ad00>

WARNING: QApplication was not created in the main() thread.
Exception in thread Thread-3:
Traceback (most recent call last):
  File "D:\anaconda3\lib\", line 973, in _bootstrap_inner
In [2]: QObject::killTimer: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread
  File "D:\anaconda3\lib\", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "D:\anaconda3\lib\site-packages\odrive\", line 318, in plot_data
  File "D:\anaconda3\lib\site-packages\matplotlib\backends\", line 408, in start_event_loop
    with _maybe_allow_interrupt(event_loop):
  File "D:\anaconda3\lib\", line 119, in __enter__
    return next(self.gen)
  File "D:\anaconda3\lib\site-packages\matplotlib\backends\", line 226, in _maybe_allow_interrupt
    old_wakeup_fd = signal.set_wakeup_fd(wsock.fileno())
ValueError: set_wakeup_fd only works in main thread of the main interpreter

Is there a better way to visualize ?


No. The noise is probably partly current shunt measurement noise and partly encoder measurement noise.

Yes, unless it’s in Gimbal mode.

Yeah, this simply may not work depending on your python version, OS, etc. You may have to capture some data then plot it.