2022-08-18 02:06 AM
(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:
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;
}
}
2022-09-05 09:22 PM
Hi,
Could someone in ST give an answer on this? Just a few comment would be appreciated.
Regards,
THA.1