This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28379D: PMSM Rotor initial position (calibration angle detection )

Part Number: TMS320F28379D
Other Parts Discussed in Thread: CONTROLSUITE,

Tool/software: Code Composer Studio

Hi community!

I am using ControlSUITE HVPM_Sensored example for driving a PMSM by TMS320F28379D DSP.

Would anyone please help me with finding the rotor initial position?

There is one part in the code commented as: "Detect calibration angle and call the QEP module", what is the theory behind this method? What exactly this code does? Is there any reference describing this part of the code?

Regards,

  • With QEP, there is an offset between the zero angle of QEP and zero angle of motor. This difference is referred as calibration angle in the legacy code. The idea is to align the rotor to electrical zero degree at start while keeping the QEP counter to zero, and after this, forcefully spin the rotor until the index pulse is obtained. Since the index pulse is used to reset the QEP counter, the value of QEP counter at the instant of index pulse is recorded as calibrated angle. This value is then added to the QEP counter read value for any other instance and then rolled within the limits of QEP. 

    There are many ways to work with qEP index. Instead of resetting at index, one could save the value at index and use it preload the counter with this value for future index pulses and let the counter reset to zero when it hits POSMAX value. This can help to avoid the use of calibrated angle code, etc.  Suggest to review the TRM for better peripheral insight.