I am a Master student of Mech. Engineering, currently working on my master thesis.
A brief introduction to put my questions in context:
I will be using the ODrive (as of now I have the 56V, 3.6 version and two 5056 PM brushless motors) for the TORQUE control of a wheeled self balancing robot (similar to the Ascento, to make myself clearer). I stress " torque "control because I will be using some advanced MPC techniques and the natural inputs to the system are the wheel torques; therefore I need to control the torque as precisely as it is possible. I will then probably integrate the system using ROS and I plan of using a Raspberry Pi 4 B as the onboard computer (probably, I am still at an early stage).
My questions are directly meant to be answered by the creators of ODrive but please, feel free to contribute if you think you can.
During my degree (actually pretty recently) I studied some control strategies for PM machines (also for IM) and, in particular, FOC. My questions are directly related to the understanding of the current torque loop control implementation on the ODrive.
This is a not negligibly lenghty list of my questions:
- To my understanding (please correct me if I am wrong), a regulation strategy in the so-called Synchronous Reference Frame is employed (in particular the qd0 frame). I know for a fact that the expression of the torque in the reference frame is 3/2P_pairs[PM_flux*i_q+(L_d-L_q)i_qi_d]. I read in the forum various instances suggesting an estimation of the torque using only the i_q component and the Kv rating of the motor. Isn’t that “wrong” in the case we are not dealing with an isotropic machine? In that case L_q and L_d would be different and the torque would depend also on the i_d component.
- Given a torque reference, how does the torque loop compute the currents i_q and i_d? Is it through the MTPA technique (“maximum torque per ampere”)? I would guess yes, since trying the torque control on the motors I see a set i_d different from zero.
- Since i_q and i_d are measured, how can I use them to compute the “exact” value of the torque? Or equivalently, how do I get an estimate of the PM_flux? Is it something which I can extrapolate from the motor datasheet (e.g. through the Kv)?
- I also read that the current loop (and also position and velocity loops) runs at 8 KHz. However, could someone provide me an estimation of the maximum theoretical BW of the current loop, supposing I am using ATM102 encoders with 2048 PPR settings (4x2048 with quadrature)? I know that, as a rule of thumb, the BWs of the loops are generally chosen 10 smaller proceeding towards the outer loops, so that the inner loops can be seen as instantaneous by the outer loop. And I also know that, using asymmetric PWM and sampling at the right instant of time during the duty cycle, the theoretical BW of the torque loop cannot be higher than approximately the Carrier frequency /20 (if I remember correctly). Does the ODrive implement asymmetric PWM or simply a symmetrical one?
- Are the current gains automatically chosen depending on the measured physical parameters of the motor (self inductance and resistance)? In the control scheme I studied they were chosen in order to perform a zero-pole cancellation with the motor plant, so that the current transfer function could be approximated with a first order one. Is that also the case of the ODrive?
- Is an antiwindup scheme implemented?
- Are there any feedforward therms after the two i_q and i_d regulators compensating for the back-emfs?
- Given my configuration (56V ODrive, 5056 motor, ATM102 encoder, 4000mAh 6s LiPo battery), which is range of torques I can expect to be able to command? Also, with what resolution? Knowing these specs is crucial for two reasons: first, I need to know how good a torque control I can achieve and, secondly, I’d like to be able to include the actuator (meaning the ODrive) real characteristics in my future Gazebo model of the robot.
I hope I didn’t make too many questions for a single discussion.
The following is an image of the control strategy I am referring to. I’d like some feedback on the differences between this and the one the ODrive implements. I hope it will be pretty much self-explanatory (P/R indicates a polar to rectangular transformation and R/P vice versa) .