According to what I found in the datasheets, in order to have max torque per ampere, stator's flux has to be applied on 90 degree to rotor's flux (PMSM motor) and on 45 degrees (ACIM motor). So, with use of an observer (or an encoder), current angle is determined, then this angle is used to convert stationary AlphaBeta frame in to rotating DQ frame (Park conversion), Id/Iq are corrected, and with Park_Inverted rotating frame is back converted to stationary AlphaBeta frame. In both conversions Park/Park_Inverted is used the same angle. I'm wondering where (in which API) is added 90 degree to the current angle. Maybe the moment in which Id/Iq are corrected, in fact is indirect angle correction?
I am working with MKV46F256VLL16, MCRSP_ACIM_V1.2.0/MCRSP_PMSM_V1.2.0 and MCUXpresso_IDE.