A little question about Speed/postion loop rate

I am trying to design a position loop for odrive, as we need to control four motors’ positions at the same time,
I want to add a position loop to the velocity loop of odrive,but i am not good at C++,which means i don’t know how fast the velocity loop calculate.
Wish somebody can help me, just tell me a rate,i am using the version 0.5.1
or maybe you can teach me how to find the rate,

ODrive already has position control built in, no need to implement it :wink:
It runs at 8000Hz

thank you for your help! But actually i am learning omni wheels car’s control. I want to calculate and control the car’s position more accurately,not only single motor’s. For that i need to know the vel control rate and decide my pos rate.
Do you mean pos control runs at 8000Hz?

All control loops on ODrive run internally at 8000Hz. I’m not sure what you mean though. If you want to estimate your cars position from the current velocity, you can convert the velocity to rad/s, multiply that with the wheel radius and integrate it over time to get an absolute position.

1 Like