Dear friend:
I have a problem of calculating of back EMF in the MC9S12ZVM_BLDC_Sensorless,which is Official routine.
Why is calculate the back EMF by the flowing routine?
INTERRUPT void ADC0done_ISR(void)
{// LEFT justified result ADC data
DCBusCurrent = ADC0ResultList[0] - DCBusCurrentOffset;
DCBusVoltageHalf = MLIB_Mul(ADC0ResultList[1]>>1, 13653 ,F16); // DC Bus Voltage * 5/6 / 2
phaseVoltage = ADC1ResultList[0]>>1;
bemfVoltage = phaseVoltage - DCBusVoltageHalf;
.....................................
...................................
}
According to information of AN4704.
we get a new equation from Eqn.7 ec=(2*uc-uDCB)/3
ADC0ResultList[1] is uDCB by ADC measurement. But this value is normal 1/5 by Internal shunt.
because LEFT justified result ADC data, now ADC0ResultList[1] is 16 times normal value.
ADC0ResultList[0] is uc (Phase voltage),this value is 16 times normal value by LEFT justified result ADC data.because Internal shunt, This value is divided by 6.
Finally, we get a equation ec=(4*uc-2*uDCB)/3 by Front program,
this EMF is two times theoretical value .
Please tell me where is wrong.