Converting ADC Bit Value to q1.15 Current in "per Unit"?
- May 10, 2019
- 3 replies
- 2867 views
Hi,
I'm reviewing a code for PMSM motor control with FOC. The library used is an older one and described in UM0492 "STM32F103xx permanent-magnet synchronous motor FOC software library V2.0" (attached file)
I'm wondering how the software know what current is flowing through motor.
There is one define MAX_CURRENT, which does not change any current value when changing this constant.
The current read through an ICS is just the ADC raw bit value, but in documentation it says this is q1.15 format in "per Unit". (File stm32f10x_svpwm_ics.c, function SVPWM_IcsGetPhaseCurrentValues). I can't see any conversion to correct per Unit value. Measuring current with an oscilloscope and looking to variables current does not seem to be correct.
Where is this conversion made in code to per Unit value?
Thanks for any help.
Regards,
Dani
