AnsweredAssumed Answered

BLDC Motors  param

Question asked by 歌 苏 on Sep 12, 2017
Latest reply on Sep 16, 2017 by 歌 苏

Hello,

I reference the document AN4704 and code to  do research of Sensorless Control of BLDC Motors use MC9S12ZVM .And in the code as follow:  

I do not know: why SPEED_CALC_NUMERATOR=16777216?  1431.655765 = 1000 rpm? How to calculation it ?

 Thanks!

 

#ifdef _HIGH_SPEED_SCALING
/***** High speed scaling *********************
* For 4 pole-pairs motors
* Boundary values for 1.28 us timer period:
* - Minimal speed: 60 rpm
* - Minimal speed scaled: 86
* - Maximal speed: 22887 rpm
* - Maximal speed scaled: 32767
*********************************************/
#define SPEED_CALC_NUMERATOR 16777216
#define STALLCHECK_MIN_CMT_PERIOD 97 // 97 = 125 us (20 krpm on 4 pole-pairs motor), min value = 85 (22.89 krpm)
#define REQUIRED_RUN_SPEED 1432 //   1431.655765 = 1000 rpm
#define MIN_SPEED (1432/2) // 500 rpm minimal speed for Down button control (should be min 10% of nominal motor speed)
#define MAX_SPEED (1432*13) // 13 krpm maximum speed for Up button control
#define SPEED_STEP (1432/2) // 500 rpm, Up/Down step for button controls
//*****
#endif

 

period6ZC = periodZC_F_PhA + periodZC_R_PhA + periodZC_F_PhB + periodZC_R_PhB + periodZC_F_PhC + periodZC_R_PhC;
actualSpeed = SPEED_CALC_NUMERATOR / period6ZC;

Outcomes