In the Clarke macro, As and Bs are per unit values. In the HVPM sensored application, the max current swing is almost 20A. ADC values for the current are passed into the Clarke module as follows:
// ------------------------------------------------------------------------------
// Measure phase currents, subtract the offset and normalize from (-0.5,+0.5) to (-1,+1).
// Connect inputs of the CLARKE module and call the clarke transformation macro
// ------------------------------------------------------------------------------
clarke1.As=_IQ15toIQ((AdcResult.ADCRESULT1<<3)-_IQ15(0.4970))<<1; // Phase A curr.
clarke1.Bs=_IQ15toIQ((AdcResult.ADCRESULT2<<3)-_IQ15(0.4995))<<1; // Phase B curr.
If, however, the current swings were limited to, for example, 12A by the power supply when using the same board - how would that affect the per unit calculations. All motor control macros calculate using per unit values. Does this mean that max. commanded quadrature component of current has to be appropriately scaled down? Further, ADC values will at most be 0xCCC and at least be 0x333. Also, iq max would be around 0.57 per unit correct?
Ideas?

