cancel
Showing results for 
Search instead for 
Did you mean: 

The switch-over algorithm from VSS to STO when sensorless rev-up

THA.1
Associate II

(Environment)

MC_SDK 5.Y.3 + STM32CubeMX 6.3.0 with HAL + IAR EWARM 8.5

(Hardware)

custom board based on F446RE + custom power board(3-shunt) + Low Voltage BLDC motor

(Control Mode)

Speed Control with STO+PLL

(Question)

At VSS_CalcElAngle() in "virtual_speed_sensor.c",

Let's assume the switch-over just started and on going, that is:

  • pHandle->bCopyObserver = false
  • pHandle->btransitionStarted = true
  • pHandle->hTransitionRemainingSteps >= 0
  • pHandle->_Super.hElSpeedDpp >= 0  (assume positive direction rev-up)

Then hAngleDiff = *( int16_t * )pInputVars_str - pHandle->hElAngleAccu

has the meaning of (STO angle - VSS angle)

In normal case, hAngleDiff would be >= 0 (STO angle = 90 degree, VSS angle < 90 degree in dq-frame), and the following transition will be executed:

if ( hAngleDiff >= 0 )  {

     pHandle->bTransitionLocked = true;

     hRetAngle = *( int16_t * )pInputVars_str - hAngleCorr;

}

I can not, however, understand that in which case hAngleDiff < 0, and what is the physical meaning of the following (code in else{ })?

if ( hAngleDiff >= 0 )  { }

else  {

     if ( pHandle->bTransitionLocked == false ) {

       hRetAngle = pHandle->hElAngleAccu;

     } else  {

       hRetAngle = *( int16_t * )pInputVars_str + hAngleCorr;

     }

}

1 REPLY 1
THA.1
Associate II

Hi,

Could someone in ST give an answer on this? Just a few comment would be appreciated.

Regards,

THA.1