Clarke transform used in Odrive Pro

Hey y’all!
I would like to use the measured q_axis readings for modeling purposes. As far as I know, the Odrive Pro firmware assumes the motor is wye/star wound, and scales phase current measurements accordingly. And as far as I can tell, Odrive Pro uses the amplitude invariant form of the Clarke transform (rather than the power invariant). Can anyone confirm this? I know that for most purposes this really doesn’t matter, but I am doing a bit of energy accounting, so making sure I truly understand the measured q_axis value is important to me.
Thanks!

I_alpha = I_A
I_beta = 1/sqrt(3) * (I_B - I_C)

So this is the amplitude invariant transform, correct. When phase = 0, I_alpha == I_A == I_d.

I’m curious more as to the sort of energy accounting you’re looking to do? If you can give a quick overview I’m happy to make some recommendations as to other parameters it could be worth reading! Specifically we have electrical_power and mechanical_power available to read (though note mechanical_power is contingent on an accurate torque_constant).

@solomondg Great, thank you for the confirmation.

I am planning to do some full system efficiency mapping (across a grid of torque & speed). I have a battery/powersupply + odrive + motor + torque sensor setup. I plan to measure mechanical power (using torque sensor + odrive velocity), electrical bus power into the Odrive (with a power meter inline with the battery, or Odrive I_bus * V_bus).
Additionally I want to understand 1) driver losses and 2) motor losses.
If I could get a measure of power into the motor (would that be VqIq + VdId?), then I think I could calculate all of it.

bus_power (measured) = driver_loss + motor_power (measured???)
motor_power = mechanical_power (measured) + joule_heating_loss + eddy_current_loss*

*Not exactly sure how/if I’m gonna handle this part yet

Lmk if this makes sense!

Thanks for the help

Cool, that all makes sense!

If I could get a measure of power into the motor (would that be VqIq + VdId?), then I think I could calculate all of it.

Note it’s 3/2 (VqIq + VdId), since it’s the power invariant transform, or you can just use the ODrive electrical_power property. Note though that property is bus side, it won’t account for power loss in the ODrive itself.

If you want to go all-out, per-phase voltage and current probes (plus on bus input) is a good method, since you ideally want to avoid trusting the motor controller itself. That won’t technically decouple q-axis from d-axis currents, but you can rely on the ODrive’s readings for a good estimate of the relative magnitudes (and d-axis will be zero at steady state anyways). If you want something super fancy, you gotta get a scope that costs more than most new cars :slight_smile: Teledyne LeCroy - MDA 8000HD Motor Drive Analyzers. All that being said, that’s coming from a perspective of really needing to calculate the exact percent efficiency of the driver – if you only care about the motor (which you likely do – the power loss in the ODrive will be relatively very small), then it’s likely fine to just use electrical_power as the motor input power, and vel_estimate + torque meter reading for the motor output power.

Oh - here’s a very approximate model of the power loss in an ODrive Pro. x-axis is current (Iq), y-axis is power dissipation in the ODrive (W). Change “V” for the operating bus voltage: Desmos | Graphing Calculator.

So e.g. if you’re at 48V and 60A Iq, you should expect ~30W Pd in the ODrive.

This is a nice post too btw! Things in Motion: Basic BLDC (PMSM) efficiency and power loss estimations

Ah ok so Vq and Vd are voltages across the mosfets & the motor phase? I assumed it was just across motor phase. Ok so it sounds like isolating power into the motor is a bit more complex than I thought! Thanks for all of this info, for now I will assume power losses in the Odrive are minimal.

Yeah, Vd/Vq is the “commanded” voltage to the motor (per D/Q axis), the “actual” voltage will be dropped a bit due to inverter losses. But as you said, I think it’s just fine to assume inverter losses are minimal.