Showing results for 
Search instead for 
Did you mean: 

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

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?

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.