Motor Model Temperature Compensation and Field Weakening

Hi all,

I am using a motor that has relatively good characterization data available from the manufacturer, and I have support from them to get more information if needed. There’s two things I’m interested in. First being Temperature Compensation of the motor model parameters. Second being enabling Field Weakening (and any other “advanced” features to aid in performance/response, like dI_dt_FF_enable).

For a bit of background, I am using the ODrive Pro over CAN in Passthrough Torque Mode (I want as direct control of torque as possible). Since I’m using it in Torque mode, I need an accurate model of the torque (as accurate as I can get I guess). The application will see quite the temperature swing, which does have a noticeable impact on the motor parameters like Kv and Kt.

For example, these curves were provided for 25C and 155C:

I also added a theoretical curve at 155C with Field Weakening enabled. (I understand it won’t match perfectly to a flat power line, but I was just trying to show the potential.)

I have an external controller that is sending the torque commands and reading feedback from the ODrive, so I have quite a bit of flexibility to change things on the fly. One way I was thinking about accomplishing this temperature compensation was to update the motor model parameters on the fly over CAN since it appears with the latest firmware I might be able to send SDO commands to individual parameters. Is that true? If so, what model parameters should I be looking into changing?

At a minimum I believe I’d want to change:

  • phase_inductance (or ideally motor_model_l_d and motor_model_l_q)
  • phase_resistance
  • torque_constant
  • ff_pm_flux_linkage (maybe? I need to look into how to calculate/measure/acquire this)
  • what else?

For example on what I have for motor parameters right now:
image
This is what was provided by the manufacturer in their public datasheet (along with some of my calcs). Like I mentioned though, I should be able to get whatever additional information is needed from them.

Onto the Field Weakening…

From what I’ve gathered digging around here and in the docs, I’d need to do the following:

  • Set fw_enable
  • Set fw_mod_setpoint to the modulation index the FW controller will control Id to. (any guidelines here? Since I have a Pro, can I set it 0.99, or do I need to go lower?)
  • Set fw_fb_bandwidth. (Any guidelines on starting points, or is this going to be some trial and error? I’d expect I’ll need to do something like set a fixed torque that gets me into field weakening, but not up against the speed limiter, and adjust until mod index is controlled nicely?)

I assume setting accurate motor model motor_model_l_d, motor_model_l_q, and ff_pm_flux_linkage are critical for FW?

What about wL_FF_enable and bEMF_FF_enable, are they worth enabling if I end up getting all the other motor model parameters on point?

Essentially on top of trying to get the most “aggressive”/unfiltered performance out of this motor, I’m looking to be able to produce some usable torque out to 8000RPM, since I will need to operate out there, and without FW, I don’t see how I’ll be able to make it work.

Alright I know that was a lot, but hopefully that lays it all out and you guys can help correct me where I’m wrong and guide me to what I’m after!

Thank you!