cancel
Showing results for 
Search instead for 
Did you mean: 

STSPIN32F0601 MCSDK 5.4.8 MOTOR POWER MEASUREMENT ERROR!

GenuineDeveloper
Associate III

Hi,

I am using STSPIN32F0601 eval board in sensorless configuration with RSHUNT for current measurement. The issue is that the measured motor power from function PQD_CalcElMotorPower is incorrect. It has an offset with respect to the actual motor power and this error varies with respect to change in RPM.  Although the relationship between RPM and this offset is not linear, it is observed that the offset is higher in higher RPMs and reduces towards lower RPMs. What could be the cause of this issue?

Secondly, I have custom made prototype boards for my application, where I have followed recommended circuit as per the documentation and eval board. In those PCBs I have found that this measured power offset is not consistent across all PCBs. The error band is different in 3 out of 10 PCBs. What is causing this variation? What points should I look for in these PCBs to differentiate the factor causing this variation?

How can I get correct motor power where in atleast the error offset is consistent across all PCBs?

Please let me know if any other details are required.

MCSDK 5.4.8

1 ACCEPTED SOLUTION

Accepted Solutions
RhSilicon
Lead

in sensorless configuration with RSHUNT for current measurement

The UM3042 seems to describe that "Current driving mode" is separate from "Sensor-less algorithm". Perhaps this is why disparity in control occurs.

  • Current driving mode:

The motor speed is controlled by limiting the peak of the current flowing through the active phases.
This driving mode exploits the presence of an amplifier A and a comparator C. The current is controlled by setting the duty cycle of a PWM generated by a timer (REF timer) used as the reference voltage of the comparator C. The output of the comparator triggers the switch-off of the PWMs connected to the motor phases when the amplified sense resistor voltage is greater than the reference voltage.

  • Sensor-less algorithm:

In the sensor-less mode, the position of the rotor is obtained by detecting the zero-crossing of the BEMF sensed at the floating phase. This is commonly done using an ADC as shown in Figure 7. In particular, when the magnetic field of the rotor crosses the high impedance phase, the corresponding BEMF voltage changes its sign (zero-crossing). The BEMF voltage can be scaled at the ADC input, thanks to a resistor network controlled by a GPIO. When the GPIO output is low, the resistor network divides the voltage coming from the motor phase.

Perhaps this document is a starting point: The AN5423: "This document handles the current measurement in BLDC motors for a three-phase topology"

 

View solution in original post

2 REPLIES 2
RhSilicon
Lead

the offset is higher in higher RPMs and reduces towards lower RPMs

Although it is not linear, as mentioned, maybe it can be proportional, maybe some scale factor needs to be reconfigured.

On the STM YouTube channel there are several videos that might be interesting about motor control:

https://www.youtube.com/@stmicroelectronics/search?query=MOOC%20-%20Motor%20Control

I don't know if it can help in your case, but I found these videos about advanced debugging:

https://youtube.com/playlist?list=PLnMKNibPkDnEDEsV7IBXNvg7oNn3MfRd6

RhSilicon
Lead

in sensorless configuration with RSHUNT for current measurement

The UM3042 seems to describe that "Current driving mode" is separate from "Sensor-less algorithm". Perhaps this is why disparity in control occurs.

  • Current driving mode:

The motor speed is controlled by limiting the peak of the current flowing through the active phases.
This driving mode exploits the presence of an amplifier A and a comparator C. The current is controlled by setting the duty cycle of a PWM generated by a timer (REF timer) used as the reference voltage of the comparator C. The output of the comparator triggers the switch-off of the PWMs connected to the motor phases when the amplified sense resistor voltage is greater than the reference voltage.

  • Sensor-less algorithm:

In the sensor-less mode, the position of the rotor is obtained by detecting the zero-crossing of the BEMF sensed at the floating phase. This is commonly done using an ADC as shown in Figure 7. In particular, when the magnetic field of the rotor crosses the high impedance phase, the corresponding BEMF voltage changes its sign (zero-crossing). The BEMF voltage can be scaled at the ADC input, thanks to a resistor network controlled by a GPIO. When the GPIO output is low, the resistor network divides the voltage coming from the motor phase.

Perhaps this document is a starting point: The AN5423: "This document handles the current measurement in BLDC motors for a three-phase topology"