Oscillations/Vibration in Closed_loop mode

#1

Hello!

I am using a 24V 3000rpm motor:
https://www.ebay.com/itm/1PC-Brushless-DCMotor-NEMA23-57BLF03-188W-24V-0-6Nm-3000RPM-101mm-Length-Cutting/132754552054?_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20160908105057%26meid%3D3fd6fa3fdb114c8bb7abf92cd6c787c7%26pid%3D100675%26rk%3D1%26rkt%3D15%26sd%3D132754552054%26itm%3D132754552054&_trksid=p2481888.c100675.m4236&_trkparms=pageci%3Ab6ff0b5b-6544-11e9-911c-74dbd180e44b|parentrq%3A46eda81d16a0add88e202a90fffd1afc|iid%3A1

with the AMT102-V encoder, and the full calibration goes smoothly, but when I go to change the control mode to closed loop it just vibrates to hold the position. I tried then to change the set point and it does not respond and just continues vibrating. I don’t have any errors before or after calibration or during or after the closed loop.

Here are the controller settings:

And motor configs:

thanks!
Michael

#2

Update - I’m now able to move the motor in closed_loop_mode, but there is still a lot of vibration when not in motion. once in motion, it is smooth, but when the motor is stationary, it is vibrates a lot. I think that I need to tune gains, but not really sure with the guide.

#3

Read through the section Tuning Parameters on this part of the documentation https://docs.odriverobotics.com/commands.html. Your vel_gain is probably too high. Try reducing it by a factor of 2 or 10 (and save_configuration() and reboot() if you don’t notice any changes).

1 Like
#4

So, I actually just figured out the problem! I ended up graphing the encoder position and found there was ton of noise, and found documentation mentioning high CPR values. I have the encoder set the highest resolution (8192 i think?) and so I ended up needing to increase the bandwidth of the encoder in the config files to to calm it down. It’s working perfectly now.

do you think decreasing the vel_gain would even when its stationary?

Is there a control block diagram for the odrive anywhere?

#5

There really isn’t an easy solution. You need to manually tune the pos_gain and vel_gain when you have settled on a choice of motor and encoder.

8192 is a normal encoder resolution, but a lot more than required for stable control of the motor. 512/1024 should be more than enough. A lot of BLDC motors and ESC’s (like the ODrive) use hall-effect sensors which have the minimum required resolution for low-speed control.

For comparison; I think this means the encoder resolution when using hall effect sensors is equal to the number of coils times two (assuming the ODrive uses quadrature). My motors have 4 magnetic poles (2 pole pairs) and 12 coils so an encoder resolution of 24.

My motor - https://www.aliexpress.com/item/SURPASS-HOBBY-4274-2000KV-4-Poles-Sensored-Brushless-Motor-for-RC-1-8-Truck-Bigfoot-Car/32890284986.html .

Your encoder resolution should be determined by your application. If you need control within a single revolution then 8192 might be necessary. My application requires a movement range of ~500 turns, so the total resolution within my application is 500 turns * 24 encoder resolution = 12.000, more than enough.

Control diagram: https://docs.odriverobotics.com/control