cancel
Showing results for 
Search instead for 
Did you mean: 

Bug Report MCSDK 5.4.5: Calculation error if high power motor is used

CKlei.1
Associate III

I'm using MCSDK 5.4.5 in a high torque BLDC application.

DC bus voltage: 600V, motor power: 4kW, Hall sensors, current sensing with two insulated current sensors (7mOhm).

I had the effect that the motor power, returned by the API, switched to a negative value when increasing torque.

I have detected an overflow of the 32-bit variable wAux3 in the method PQD_CalcElMotorPower() in the file pqd_motorpower_measurement.c with my setup. If Iq is large enough and other factors such as PQD_CONVERSION_FACTOR are large as well, an overrun error occurs in the calculation.

By changing the order of the calculation, I was able to correct this effect.

I am now afraid that such an error can occur in other places in the code...

Question: is there a possibility in the MCSDK to adjust the scaling of the variables to fit on a high powert application?

2 REPLIES 2
cedric H
ST Employee

Hello @CKlei.1​,

Thank you for reporting this issue.

Right now there is no scaling mechanism in place in the SDK.

I will report this to our development team to add it in a futur version.

Regards

Cedric

JELLY.1
Associate II

I'm late to the party, but I was having the same problem.

Putting wAux3 divided by 10, before 6 times wAux3 worked for me!

Belated thank you to CKlei.1 for finding this nugget.