TMS320F28069F: InstaSPIN: Clip current for Iq controller

Part Number: TMS320F28069F

We use a TMS320F28069FPFPQ in combination with InstaSPIN libraries to control several PMSMs that are already in production. We urgently need a way to limit the maximum current command output.

It is understood that “USER_MOTOR_MAX_CURRENT” sets a limit on the maximum current command output of the Speed controller, but not the subsequent Iq controller, making its variable name a bit misleading. We implemented in software a max phase current that when reached causes a shutdown to protect the motor. This successfully prevents motor and driver damage, but there must be a way to allow for continuous operation within the defined operational range without reaching the limit shutoff values.

Two ways that this lack of Iq-clipping is problematic:

  1. Trying to catch a spinning down blower, due to the large difference between SP and PV the controller causes the current to jump outside of the operational range into the limit that shuts off the motor again resulting in sharp current peak hick-ups until the motor has stopped after which a defined ramp brings him back to operating speed. Btw: This cannot be manually repeated, even if ramp rate is 65000rpm/s the output is clipped successfully to USER_MOTOR_MAX_CURRENT until nominal speed is reached.
  2. After some time in saturation (insufficient voltage to reach SP) the integrator part of the PID wound-up and after a sudden voltage increase causes a current peak leading to a shutoff. This was patched by transitioning from static to dynamic anti-windup behavior as outlined in the InstaSPIN guide. But, also here, the more general solution should be a clipping of Iq IMHO.

The above described behavior also occurs with Field Weakening and MTpA disabled.

Thank you for your support.

  • As you noticed, the USER_MOTOR_MAX_CURRENT limits the speed controller's output when speed closed-loop is enabled. If torque control is enabled, the torque current will be limited by the setting value. The phase current of the motor with FOC is a sinusoidal waveform that can not be limited directly by the algorithm.
    The typical PI controller with wind-up is used for speed and current regulation. You can tune the gains or add a forward controller to improve the response to voltage or load ripple.

  • Dear Yanming,

    thank you so much for your fast reply.

    Which variable/value are you refering to with "... the torque current will be limited by the setting value."?

    Along the same lines, how exactly can "The phase current ... be limited directly by the algorithm."?

    This is precicely what we are looking for. Could you please be very specific on how this can be achieved.

    Thank you very much in advance

  • The phase current of the motor with FOC is a sinusoidal waveform that can be limited directly by the algorithm.

    A typo. The phase current of the motor with FOC is a sinusoidal waveform that can not be limited directly by the algorithm.

  • Dear Yanming,

    As a serious, global and professional company, I'm sure TI had many years of experience to develop solutions. Like the park transformation allows to easily manage the sinusoidal waveform aspect of the phase current, there are ways to limit the phase current.

    1) Which indirect ways exist to limit the phase current? Please be specific!

    2) Based on the difference between Iq_ref and Iq in combination with its PID values the Iq controller will calculate a new Iq-target. How to clip this Iq-target into a valid range before transforming it into Vq.

    3) Since the output of the speed controller can clip the current, how can one increase the weight of the speed controller and decrease the subsequent Iq controller? Will the output be stable?

    Thank you

  • As you noticed, the classical FOCs use a similar algorithm to control the d-axis and q-axis currents rather than the phase current directly. TI also implements such an FOC technique. If you want to limit or control the phase currents, you have to implement another control algorithm, such as trapezoidal control, or use hardware to limit the motor phase current peak. You can find the related techniques on the TI website or other engineering websites.

    As mentioned above, the Iq will be set by the speed PI controller or the setting torque current you want. The current controller will convert the required Id & Iq to the output Vd and Vq. You can find the detailed description in the related motor control textbook. It's difficult to introduce this motor control theory in this E2E thread.

    Please have a look at the PI or PID regulator introduction in Chapter 11 Tuning Regulators of the InstaSPIN-FOC and InstaSPIN-MOTION User's Guide for the current PI regulator. https://www.ti.com/lit/spruhj1. Or the related textbook about PI controller or control theory.

    At that point, you will need to debug your system on your own; we are unable to help in developing a customer's system algorithm or code. We can assist only with device-specific questions or solutions that we market or document.